本文介绍了什么是位置提供商QUOT;被动"?看到HTC Desire采用了Android 2.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我进入基于位置的模式,我检查是否存在任何地点提供者通过调用

Before I go into location based mode I check for existence of any location providers by calling

List<String> android.location.LocationManager.getProviders(boolean enabledOnly) //enabledOnly = true

和检查所得到的列表的大小

and checking the size of the resulting list.

现在我测试我的应用程序上的HTC Desire采用Android 2.2。该系统设置不允许任何位置跟踪(GPS和手机已关闭)。

Now I tested my App on a HTC Desire with Android 2.2. The system settings don't allow any location tracking (GPS and mobile is turned off).

然而,得到返回的列表中有1项,其值是被动。它是什么?我可以使用它?提供者似乎慢/无法正常工作。

However, the list get returned has 1 entry, whose value is "passive". What is it? Can I work with it? The provider seems to be slow / not working.

推荐答案

在Android参考:

一个特殊的位置提供用于接收位置,而不会真正启动位置锁定。这提供可用于被动地接收位置更新,当其他应用程序或服务要求他们无需实际请求自己的位置。该供应商将返回由其他供应商产生的位置。

所以,不,这是不太可能做你任何好处,如果没有其他的位置提供可用。

So no, it's not likely to do you any good if there are no other location providers available.

这篇关于什么是位置提供商QUOT;被动&QUOT;?看到HTC Desire采用了Android 2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:57
查看更多