使用 Android 检测用户活动(跑步、骑自行车、驾驶) [英] Detect user activity (running, cycling, driving) using Android

查看:47
本文介绍了使用 Android 检测用户活动(跑步、骑自行车、驾驶)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用我的 Android 设备检测用户是步行、骑自行车还是开车?我检查了 Google Fit 应用程序.它区分了跑步、 骑自行车和驾驶.我很困惑我应该使用什么算法来区分这些活动.

Using my Android device how can I detect if the user is walking, cycling or driving? I have checked the Google Fit app. It differentiates between running, cycling and driving. I am puzzled about what algorithms I should use to differentiate between these activities.

我知道我必须使用加速度计传感器.但我仍然无法区分这些活动.

I know I would have to use the accelerometer sensor. But still I can't differentiate these activities.

推荐答案

您可以为此使用 GooglePlayServices.

You can use the GooglePlayServices for this.

它为 ActivityRecognition 提供特殊的 api,它返回用户活动的置信度.

It Provides special apis for ActivityRecognition, which returns the User activity with confidence level for each.

https://developer.android.com/guide/topics/location/transitions

http://developer.android.com/training/location/activity-recognition.html

这篇关于使用 Android 检测用户活动(跑步、骑自行车、驾驶)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆