16 Oct 2012 8:18 AM #1
Unanswered: Avoid allow get Location Alert on App startupHi,
I am getting "allow current location alert" before my App actually rendered, can we prevent this, Also I am getiing Long message for allowing instead of short one.
The long message somthing look like tis one
'/var/mobile/Applications/XXXX-XXXX-XXXX-XXXXXXXXXXX/AppName.app/www/index.html would like to use your current location'
Please advise how to avoid that.
18 Oct 2012 11:11 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
There is no way to prevent this. This popup is what tells the OS to allow the browser to get the device location for your app.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
18 Oct 2012 11:25 AM #3
Check out this thread, http://stackoverflow.com/questions/1673579/location-permission-alert-on-iphone-with-phonegap
It looks like this is an issue with phonegap. If you wait until the device is ready you shouldn't get this error. I'm not exactly sure what your code is doing, but if you find the code that is doing a geolocate and make sure it doesn't fire until after the device is ready that should help. Maybe make a button that the user clicks to before finding the location.
18 Oct 2012 1:38 PM #4
I am getting location when App is launched after log in button but long message is still there, I tried to use device.geolocation but App crashed. I did saw this link as well that is why I am calling location on button click.
Please do help me on this
18 Oct 2012 1:57 PM #5
18 Oct 2012 11:32 PM #6
I am using Sencha touch 2 only no phonegap usage.Please guide regarding Sencha touch 2