Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-197] Android: getCurrentPosition does not always return a position.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:52:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.8.0
ComponentsAndroid
Labelsandroid, defect
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T02:25:16.000+0000
Updated2011-04-17T01:52:18.000+0000

Description

Comments

  1. Don Thorp 2011-04-15

    getCurrentLocation doesn't always return a value. http://support.appcelerator.net/discussions/titanium-mobile-discussion/753-kitchensink-geolocation-and-android"> Support Ticket When using coarse accuracy with watchPosition, does return data, but it is selecting providers only if they're enabled. getCurrentPosition, defaults to high accuracy, but is set to select any provider. If course accuracy is set explicitly, then getCurrentPosition returns a result.

    This behavior suggests that getBestProvider is using the GPS for a position and since it may not have a last position, it doesn't look further down the providers for an enabled provider that does have a position. getCurrentPosition should be changed and tested with only using enabled providers, to degrade gracefully, if possible.

  2. Don Thorp 2011-04-15

    (from [db1f307d3425092a79c6848937684bfec5313a76]) [#197 state:resolved] Allowed getCurrentPosition to check for any last position, not just currently enabled ones http://github.com/appcelerator/titanium_mobile/commit/db1f307d3425092a79c6848937684bfec5313a76"> http://github.com/appcelerator/titanium_mobile/commit/db1f307d34250...

JSON Source