Search code examples
androidgoogle-play-servicesactivity-recognition

Can ActivityRecognition API work without a data connection?


I am looking to use the Google Play Service ActivityRecognition API as part of an Android app which will be offline for most of its usage; users will generally be out and about and a data connection is not guaranteed.

Looking at the docs, the requestActivityUpdates method requires a connected GoogleApiClient.

My question is, is the Activity Recognition API guaranteed to work if there is no data connection present?


Solution

  • Sure it works without data connection.

    Google Play services is basically the background app that is running in the Android OS. Thus by requesting connection to GoogleApiClient you are connecting to this Google Play services app.

    It is said that Google Play services apk does silent updates, however it is better to check if it is updated to the latest version, since sometimes services fail to update (happened with me only on Android 2.3).