Search code examples
androidapiandroid-sensorsgoogle-fitactivity-recognition

Difference between Google Fit API and ActivityRecognitionAPI


I'm studying how to get the user activity from the android sensors and I have a question... Whats the difference between Google Fit API and AcitivityRecognitionAPI ?

The Google Fit API is newer so it's better than ActivityRecognitionAPI? There's no relation between them? Can anyone tell me where to found a great documentation or explanation of ActivityRecognitionAPI? Because de google developers website don't tell me everything I wanna know about this API...

Thanks! (And sorry for my bad english)


Solution

  • They are totally unrelated, could be used together.

    The ActivityRecognitionAPI attempts to figure out what you are doing: walking, sitting, driving in a car.

    Fit is the name for Google's equivalent of HealthKit from Apple: comprehensive store for consolidated health information, like weight, height, blood pressure, vitamin doses, etc.

    The docs are limited, all I found from google is the JavaDoc. This thread is really good. Look at the second code listing: you are going to get called back. Then you will figure out what the User started doing by passing the code into the switch statement.