I am asking for permission inside onActivityResult
of my activity and what is happening is that my activity is being paused while request permission dialog is disp
what is happening is that my activity is being paused while request permission dialog is displayed. Why is that?
requestPermissions docs says
This method may start an activity allowing the user to choose which
permissions to grant and which to reject. Hence, you should be
prepared that your activity may be paused and resumed
. Further, granting some permissions may require a restart of you application. In such a case, the system will recreate the activity stack before delivering the result to your onRequestPermissionsResult(int, String[], int[]).
Although an another solution is move your code in onStop
if possible and suitable