什么位置提供商“被动”?在Android 2.2上看到HTC Desire

在我进入基于位置的模式之前,我通过调用检查是否存在任何位置提供者
List<String> android.location.LocationManager.getProviders(boolean enabledOnly) //enabledOnly = true

并检查结果列表的大小.

现在我在Android 2.2的HTC Desire上测试了我的应用程序.系统设置不允许任何位置跟踪(GPS和移动设备已关闭).

但是,返回的列表有1个条目,其值为“被动”.它是什么?我可以使用它吗?提供者似乎很慢/不工作.

解决方法

从 Android API reference:

A special location provider for receiving locations without actually initiating a location fix. This provider can be used to passively receive location updates when other applications or services request them without actually requesting the locations yourself. This provider will return locations generated by other providers.

所以不,如果没有其他位置提供商可用,那么它对您没有任何好处.

以上是来客网为你收集整理的什么位置提供商“被动”?在Android 2.2上看到HTC Desire全部内容,希望文章能够帮你解决什么位置提供商“被动”?在Android 2.2上看到HTC Desire所遇到的程序开发问题。

如果觉得来客网网站内容还不错,欢迎将来客网网站推荐给程序员好友。