Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7456] Android: Update TiLocationHelper.isValidProvider(String) since PASSIVE_PROVIDER is introduced

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-05T06:34:52.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsAndroid
Labelsmodule_geolocation, qe-testadded
ReporterPing Wang
AssigneeOpie Cyrus
Created2012-01-27T14:54:26.000+0000
Updated2012-07-05T15:23:09.000+0000

Description

A new location provider, PASSIVE_PROVIDER, is introduced since API 8 (2.2) (http://developer.android.com/reference/android/location/LocationManager.html#PASSIVE_PROVIDER). We should add a constant for this provider, and update the platform behavior, such as TiLocationHelper.isValidProvider(String). Need further investigation to see whether there are more methods to be updated.

Comments

  1. Stephanie Soniat 2012-02-16

    Would it be possible to expose isValidProvider as public or provide some sort of public function to allow us to check individual providers? I'd love to be able to find out if GPS or Network are turned on/off, since Titanium.Geolocation.locationServicesEnabled always returns true because of the PASSIVE_PROVIDER.
  2. Opie Cyrus 2012-03-19

    Test app.js:
       Ti.API.info("Location services available: " + Ti.Geolocation.locationServicesEnabled);
       
    If you turn off GPS and network (airplane mode) in the device settings, this line should be true. Otherwise under with either of them on this value should be true.
  3. Eric Merriman 2012-03-19

    Verified fixed with 2.0.0.v20120319003254 and Titanium Studio, build: 2.0.0.201203182248. Airplane mode plus turning off GPS and Wireless positioning returned "false".
  4. Shyam Bhadauria 2012-07-05

    Re-opening to edit label.

JSON Source