Skip to content

Detecting user activity in android can be done very easily using ActivityRecognitionClient. You can detect user activities like Still, Running, Walking, Cycling, Tilting, Driving etc., We can see this API widely used in lot of fitness apps (like GoogleFit) to provide user activity info like number steps he is taken, the distance he is travelled.

Notifications You must be signed in to change notification settings

Sainathhiwale/ActivityRecognition

Repository files navigation

ActivityRecognition

Android User Activity Recognition – Still, Walking, Running, Driving

Detecting user activity in android can de done very easily using ActivityRecognitionClient. You can detect user activities like Still, Running, Walking, Cycling, Tilting, Driving etc., We can see this API widely used in lot of fitness apps (like GoogleFit) to provide user activity info like number steps he is taken, the distance he is travelled.

add service & permission inside manifest.xml file

<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

    <service android:name=".BackgroundDetectedActivitiesService"></service>

add dependencies inside build.gradle file (app level)

dependencies { implementation 'com.android.support:design:27.1.1'

implementation 'com.google.android.gms:play-services-location:11.6.0' }

Screen shot

whatsapp image 2018-05-04 at 2 51 47 pm whatsapp image 2018-05-04 at 2 58 55 pm whatsapp image 2018-05-04 at 3 00 51 pm

About

Detecting user activity in android can be done very easily using ActivityRecognitionClient. You can detect user activities like Still, Running, Walking, Cycling, Tilting, Driving etc., We can see this API widely used in lot of fitness apps (like GoogleFit) to provide user activity info like number steps he is taken, the distance he is travelled.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages