iOS Question Location Services B4i

David Elkington

Active Member
Licensed User
Longtime User
Hi All,

I have an app that needs tracking, and I ask the user when the app starts if they will allow it. However, when you select "Don't Allow", it sets the status as Never against the app, and I can't make it pop up the dialog again after that, is there a way of getting around the Never status to allow it to pop up the dialog again?
 

fbritop

Active Member
Licensed User
Longtime User
Hi All,

I have an app that needs tracking, and I ask the user when the app starts if they will allow it. However, when you select "Don't Allow", it sets the status as Never against the app, and I can't make it pop up the dialog again after that, is there a way of getting around the Never status to allow it to pop up the dialog again?

B4X:
    If LocationManager.IsAuthorized Then
        'Start the location so it becames available to your App
        LocationManager.Start(0)
    else If LocationManager.AuthorizationStatus=LocationManager.AUTHORIZATION_DENIED Then
        'Show message (bettwer to use a Dialog with Wait For) to the user telling him that he must enable location service from settings.
        'Redirect him to the settings
        App.OpenURL("app-settings:")
    else if LocationManager.AuthorizationStatus=LocationManager.AUTHORIZATION_NOT_DETERMINED Then
        'The user has never seen the location dialog. Warn him that you need the perms, again with a Dialog and a Wait for. After that call the location manager start so the OS asks the user
        LocationManager.Start(0)
    End If
 
Upvote 0
Top