Requesting Location Access

Is there any way to directly request access to the user’s location, or is there an event listener of some kind that will notify me once location access has been granted? I’m having a problem related to the use of the MapView object with the Director class and I think it hinges on this.

I have a secondary view with a MapView component in it. When the director class switches to that view, my MapView object is instantiated and I attempt to get the user’s location. The problem I’m having is that on my test device (iPhone 4), the attempt to access the user’s location takes place before they’ve granted me location access, so it’s only when they leave that screen and later return to it (instantiating it again in the Director library) that I’m able to use their location.

This is obviously unsatisfactory.

Any help/advice? [import]uid: 90273 topic_id: 18054 reply_id: 318054[/import]

Have you tested the project without using Director? If it is a Director issue you should post in the Director Class sub forum. (We don’t officially provide support for third party classes or libraries.)

You may (when you become a licensed developer) wish to check out storyboard, which is the official alternative.

Peach :slight_smile: [import]uid: 52491 topic_id: 18054 reply_id: 69081[/import]

The director class is really beside the point in this case. I only mention it to illustrate the scenario and provide some background.

Really, I’m asking whether or not it’s possible to detect the moment when a user has consented to providing location access, or if there is a way to invoke a request for location access outside of instantiating a map view.
[import]uid: 90273 topic_id: 18054 reply_id: 69085[/import]