Page 1 of 1

Enable location on android

Posted: Thu Feb 11, 2021 5:33 pm
by BigameOver
Hi,
I created an app where I need to track my user's location and return them where they are.
After the users accept all the required premissions for location tracking I can get their location only if their location option in their phone is enabled.
I want to ask them to enable the location option in their phone like the image in the attachments.
Thank you

Re: Enable location on android

Posted: Thu Feb 11, 2021 10:20 pm
by liveme
if you want to know how to open this type of window..;maybe this helps...

https://lessons.livecode.com/m/4071/l/1 ... dal-dialog

if you want tosend the user to their Android Setting page for the location enable/disable....this I dont know how its done !
8)

Looks like Google - as Apple - is going to restrict coders more and more ...from using this feature without the user consent. :|

Re: Enable location on android

Posted: Thu Feb 11, 2021 10:45 pm
by SparkOut
In the standalone settings, you will need to ensure that the correct options are chosen to include location with all its coarse and accurate choices.
This should ensure that when installing the app, the user is aware of the required permissions, but that doesn't mean that they can't install even if they leave the location service globslly disabled in the device settings.
In your spp you can check whether mobileSensorAvailable("location")  returns true or false. If true, you can start using the tracking sensor, or if false, pop up your notification asking the user to enable location choice in the device settings.