htc - Android - GoogleApiClient ActivityRecognitionIntentService is never called -



htc - Android - GoogleApiClient ActivityRecognitionIntentService is never called -

i need observe user dynamics in application. started using googleplayservicesclient till 3 months ago worked perfectly, stopped working on htc 1 device (although still working on 3 different devices i've checked). know replaced googleapiclient, thought problem, keeps not working after changing new api. problem intent given activityrecognition.activityrecognitionapi.requestactivityupdates never called. used same implementation : https://blacode.wordpress.com/2014/12/26/user-activity-recognition-through-new-activityrecognitionapi-in-android-activityrecognitionclient-deprecated/ (and again, implementation works on 3 other devices not on htc one).

i did reading online , saw similar issues solved updating google play or activating google play location services or disable mock location on android developers settings. non worked me.

has encountered same problem or maybe has thought can cause?

if onhandleintent not beingness triggered, create sure have receiver tag in manifest (inside application tag, outside activity) :

<service android:name=".activityrecognitionintentservice" android:exported="false" />

i struggled several hours before realizing missing. added it, worked.

also, if add together intentservice class through androidstudio submenu intentservice instead of adding plain java class , setting yourself, automatically registered in manifest. new...->service->intentservice

android htc activity-recognition android-googleapiclient

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -