I doubt I can do this with corona but just checking to see if I can tell if the GPS is turned on through the app. I know it will use wifi/internet if the GPS is not turned on but its not as accurate as I would prefer.
Thanks,
Warren
I doubt I can do this with corona but just checking to see if I can tell if the GPS is turned on through the app. I know it will use wifi/internet if the GPS is not turned on but its not as accurate as I would prefer.
Thanks,
Warren
Hi Warren,
Have you experimented with the “hasEventSource()” function? It might work, but then, it might just be detecting if the hardware exists, not whether it’s enabled or not (I’m not an expert on this function).
http://docs.coronalabs.com/api/type/Runtime/hasEventSource.html
Alternatively, could you just start a Runtime “location” listener and see if it returns any response after a few seconds? Then, if not, perhaps assume that the GPS is not enabled?
Best regards,
Brent
Hi Warren,
Have you experimented with the “hasEventSource()” function? It might work, but then, it might just be detecting if the hardware exists, not whether it’s enabled or not (I’m not an expert on this function).
http://docs.coronalabs.com/api/type/Runtime/hasEventSource.html
Alternatively, could you just start a Runtime “location” listener and see if it returns any response after a few seconds? Then, if not, perhaps assume that the GPS is not enabled?
Best regards,
Brent