Detect user activity (running, cycling, driving) using Android

后端 未结 4 661
生来不讨喜
生来不讨喜 2021-02-01 07:39

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

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 08:18

    You can use the GooglePlayServices for this.

    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

提交回复
热议问题