Skip to content Skip to sidebar Skip to footer

Android - Googleapiclient Activityrecognitionintentservice Is Never Called

I need to detect user dynamics in my application. I started by using GooglePlayServicesClient which till three months ago worked perfectly, Then it stopped working on my HTC one de

Solution 1:

If your onHandleIntent is not being triggered, make sure you have a receiver tag in your manifest (inside the application tag, but outside the activity) :

<serviceandroid:name=".ActivityRecognitionIntentService"android:exported="false" />

I struggled with this for several hours before finally realizing this was missing. As soon as I added it, everything worked.

Also, if you add an IntentService class through the AndroidStudio submenu for IntentService instead of just adding a plain Java class and setting it up yourself, it will automatically be registered in the manifest. New...->Service->IntentService

Solution 2:

Eventually what solved it was resetting the device to manufacturer settings, meaning that the problem was some setting in the device , which I still have no clue to what caused it. If anyone finds an answer I'll be glad to hear about it.

Post a Comment for "Android - Googleapiclient Activityrecognitionintentservice Is Never Called"