if my app is requesting GPS location, there's a dialog shown to user asking permission. and my app also check the authorization, if the user not allow use location service, I will also prompt a dialog to notify user to do the settings.
now the question is, when I first
launch the app, the user haven't allow
yet, but the check code also executed, so it will show a dialog beneath the system privacy dialog. now it has two scenarios:
- user click
Don't allow
, the system dialog dismissed, and my dialog appear, say app don't have permission to locate, that's right. - but if user click
Allow
, my will also shown because it's right there, beneath the system's dialog.
I now can only put the two part code different place, but is there a better or more reasonable way to solve this? which is, if user clicked allow, I will know.
some thoughts: 1. if I can know there's a system's privacy dialog been presenting (not a better way, because I just want to know location privacy 2. how to know the location privacy dialog's presenter, so I will use it to check if it has presenting a dialog 3. how to know what action did user do after the privacy dialog is shown can user clicked to dismiss.