How does one wait for the user to grant permissions in Android?
<p>The application I'm making takes one of two approaches A and B. As soon as the user starts the application, it asks permission to use their location. If the user grants permission it takes approach A. If the user does not grant permission it takes approach B. You must continue execution after you wait for the callback but I cannot do this since I must make a choice on the basis of the user response, so I must wait.</p>

<p>However I have been told you cannot really <em>wait</em> for the user response. Is this true?</p>

<p>Lastly, someone told me to ask for the permissions and while waiting start taking the approach in which we do not have permissions. However when trying this, the layout is shown and the application waits for the user to click buttons which essentially blocks the permission pop-up dialog. I know this because every time I click on any of the buttons, the permission dialog pops-up. So this means the user has already acknowledged that they are using the approach that does not use their location.</p>

<p>What is my mistake? or rather what can I do to wait on the user response?</p>

<p><strong>SOLVED</strong>
I created a new activity where I do all the permission requesting and declare the callback in. The waiting is peformed by doing nothing, the activity just does literally nothing the method just ends, and when the callback for the permissions is called I switch activity.</p>