"Location services not authorized" error
Opened this issue · 3 comments
hello,
I must be missing something obvious. I'm trying to run the sample code to look for a beacon, but I just keep receiving the error Location services not authorized. shouldn't the user be prompted with an alert to authorize location services? Do i need to add something to my TiApp.xml file?
this is not in the docs as of yet that I'm aware but this will fix it for you.
Ti.Geolocation.requestAuthorization(Ti.Geolocation.AUTHORIZATION_ALWAYS);
where AUTHORIZATION_ALWAYS is whichever auth your app needs. I found it the hard way...
This is working, thank you! is there some kind of callback that can be used to determine which option the user chose? Or at least catch the error to notify the user they need to turn it on or prompt again?
no this is a setting you set in your app see the docs: http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Geolocation