[TIMOB-197] Android: getCurrentPosition does not always return a position.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:52:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.8.0 |
Components | Android |
Labels | android, defect |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:25:16.000+0000 |
Updated | 2011-04-17T01:52:18.000+0000 |
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.
(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...