Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity Recognition in Android is not working

I have tried to compile example code from new Google location API that should show user's activity. Like on foot, in vehicle etc.

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

In my case what I can see is that Google Play Services is available, Location Services connection goes fine as well but nothing afterwards. onHandleIntent never been called obviously.

Have somebody tried to make it work? Or are there some other working examples available on the Internet?

Thanks

like image 873
user986589 Avatar asked Jun 13 '13 09:06

user986589


1 Answers

Is there any chance you forgot to add your service to the manifest? Something like

<application>
    ......
    <service
        android:name="your.package.ActivityRecognitionIntentService"
        android:exported="false" >
    </service>
</application>
like image 187
Pavel Dudka Avatar answered Oct 14 '22 10:10

Pavel Dudka