Android activity recognition does not work

I tried to compile sample code from the new Google locations API, which should show user activity. Like on foot, in a car, etc.

Link to an example http://developer.android.com/training/location/activity-recognition.html

In my case, what I see is that Google Play services are available, connecting to location services is also great, but then nothing. onHandleIntent was never explicitly named.

Has anyone tried to make it work? Or are there other working examples available on the Internet?

thanks

+7
source share
1 answer

Is it likely that you forgot to add your service to the manifest? Something like

<application> ...... <service android:name="your.package.ActivityRecognitionIntentService" android:exported="false" > </service> </application> 
+5
source

All Articles