Hi, i know that I can get the long/lat from a MapView.. Is that the only way? Is using location sensor with firemonkey the best way? Also, Can I detect if location services are on or off? I want to disallow my app if its off.
Last edit: Gordon 2014-04-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, is there a way to see if they location services are active, and if not, pop up a dialog box asking for permission to turn it back on ? I want to force the user to have location services on, or the app wont run.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any ideas about this? Ive searched high and low to figure out how to tell if locationservices are enabled for my app.. Cant find any way to do it.. Any ideas? Im really stuck..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If (Not TCLLocationManager.OCClass.locationServicesEnabled) or (TCLLocationManager.OCClass.authorizationStatus <> kCLAuthorizationStatusAuthorized) then
Begin
End;
does the trick.. This will look at the app and global location service setting..
Now I can close my app if its not enabled.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i know that I can get the long/lat from a MapView.. Is that the only way? Is using location sensor with firemonkey the best way? Also, Can I detect if location services are on or off? I want to disallow my app if its off.
Last edit: Gordon 2014-04-17
Also, is there a way to see if they location services are active, and if not, pop up a dialog box asking for permission to turn it back on ? I want to force the user to have location services on, or the app wont run.
Hi Gordon
You can check is locationServicesEnabled or not, if enabled you can continue your work if not you can disable some your app features,
check this : LocationSensor1.Active
Regards
Can you tell me where I can find the property locationServicesEnabled ??
I cant seem to find it.. I want to be able to test to see if the location services are on for this app
Any ideas about this? Ive searched high and low to figure out how to tell if locationservices are enabled for my app.. Cant find any way to do it.. Any ideas? Im really stuck..
After banging my head, I figured out.. that
If (Not TCLLocationManager.OCClass.locationServicesEnabled) or (TCLLocationManager.OCClass.authorizationStatus <> kCLAuthorizationStatusAuthorized) then
Begin
End;
does the trick.. This will look at the app and global location service setting..
Now I can close my app if its not enabled.