Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1892] Ask again for geolocation on device

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsdefect, geolocation, ios, ipad, iphone, rplist
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T03:04:50.000+0000
Updated2011-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.

Comments

  1. Jeff Haynie 2011-04-15

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

  2. Thomas Huelbert 2011-04-15

    1.4.2.4c5cd4a 4.1 4th gen ipod touch, 3.1.2 3g iphone

  3. ziggamon 2011-04-15

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

       Ti.Geolocation.restart();
       

    } } Titanium.Geolocation.getCurrentPosition(updateUserPosition);

  4. Jeff Haynie 2011-04-15

    (from [0aa7b139acfca905e2d47ed4d4b71760493bd840]) [#1892] restart() was causing deadlock. https://github.com/appcelerator/titanium_mobile/commit/0aa7b139acfca905e2d47ed4d4b71760493bd840"> https://github.com/appcelerator/titanium_mobile/commit/0aa7b139acfc...

  5. Jeff Haynie 2011-04-15

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

JSON Source