Pergunta

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.

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).

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.

Foi útil?

Solução

From the 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.

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top