User Allowance of GPS Tracking

Hi,

I’m using mapView:getUserLocation() and it returns zero for all values for a couple of seconds until the geocoding returns the real values. But if the user denies the use of gps tracking to get their location, it just returns zeros the same way it does when the values are still travelling back and forth from google.

Is there any way to detect whether or not the user has Ok’d the use of their location?

Thanks,

Matt
W2MD [import]uid: 10211 topic_id: 18488 reply_id: 318488[/import]

+1 Good question. [import]uid: 96411 topic_id: 18488 reply_id: 70911[/import]

Well, if it only returns zero - then its not enabled or not fully started yet?

Joakim [import]uid: 81188 topic_id: 18488 reply_id: 77039[/import]

@joakim: that’s the same question I’m asking. [import]uid: 10211 topic_id: 18488 reply_id: 77379[/import]

i dont think that was meant as a question it was the answer.

[import]uid: 7911 topic_id: 18488 reply_id: 77381[/import]

Oh ok. I understand that it is one of those two possibilities, the question is which one. That’s what makes this a problem.

If it hasn’t fully started yet, then the app should continue to display a loading screen and wait until the information has been received.

If user location isn’t enabled, then the app should stop waiting and move on.
[import]uid: 10211 topic_id: 18488 reply_id: 77387[/import]

Yes, that was my answer - maybe a little bit short :slight_smile:
Couldn’t you just wait for example a minute, to see if there are any signals coming in. If not, inform the user that “there is no active geolocation signal, please try again or check your settings”.

I don’t think that there are any flags you can check, to see - whatever if the user has accepted geolocation or if the GPS is responding.

Joakim

[import]uid: 81188 topic_id: 18488 reply_id: 77394[/import]