[TIMOB-1892] Ask again for geolocation on device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | defect, geolocation, ios, ipad, iphone, rplist |
Reporter | ctredway |
Assignee | Blain Hamon |
Created | 2011-04-15T03:04:50.000+0000 |
Updated | 2011-04-17T01:57:28.000+0000 |
Description
When asking permission to use the users location on a device, if they refuse, we need to ask again instead of throwing an error. This is what happens when running in the simulator, but not on the device. iphone, ipad.
(from [4f30af9bc90694ac299fff4b8123ef25094f0012]) [#1892 state:fixed-in-qa] Added Ti.Geolocation.restart() function to reset the geolocation system. Allows for multiple location usage prompts when using 'location' listeners. http://github.com/appcelerator/titanium_mobile/commit/4f30af9bc90694ac299fff4b8123ef25094f0012"> http://github.com/appcelerator/titanium_mobile/commit/4f30af9bc9069...
1.4.2.4c5cd4a 4.1 4th gen ipod touch, 3.1.2 3g iphone
Running Ti.Geolocation.restart() actually stops all execution of the app - nothing more is run after that. Tested on device running 1.5.1 nightly.
Basic Testcase:
function updateUserPosition(e){
if (e.error){
} } Titanium.Geolocation.getCurrentPosition(updateUserPosition);
(from [0aa7b139acfca905e2d47ed4d4b71760493bd840]) [#1892] restart() was causing deadlock. https://github.com/appcelerator/titanium_mobile/commit/0aa7b139acfca905e2d47ed4d4b71760493bd840"> https://github.com/appcelerator/titanium_mobile/commit/0aa7b139acfc...
(from [aac216b9ebad433e12df036886b052cec2e8b985]) [#1892] Whoops, forgot to change the alloc. Note that as of 4.2 (at least) restart() does not perform the expected ask-again because it's now codified in HIG that CL only asks once. https://github.com/appcelerator/titanium_mobile/commit/aac216b9ebad433e12df036886b052cec2e8b985"> https://github.com/appcelerator/titanium_mobile/commit/aac216b9ebad...