简体   繁体   English

Android中的活动识别无效

[英]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. 我试图从应该显示用户活动的新Google位置API编译示例代码。 Like on foot, in vehicle etc. 喜欢步行,车辆等

Link to the example is http://developer.android.com/training/location/activity-recognition.html 该示例的链接是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. 就我而言,我可以看到Google Play服务可用,位置服务连接也很好,但之后没有任何内容。 onHandleIntent never been called obviously. onHandleIntent从未被明显调用过。

Have somebody tried to make it work? 有人试图让它发挥作用吗? Or are there some other working examples available on the Internet? 或者互联网上是否还有其他一些工作示例?

Thanks 谢谢

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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM