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
There is also possibility that, your Activity (say, MainActivity) that invoking the
requestPermissions()
might have been declared flag
android:noHistory="true"
in the Manifest.
Therefore the MainActivity is paused, and eventually finish()
'd during requestPermissions()
.
From Android documentation requestPermissions
You cannot request a permission if your activity sets noHistory to true in the manifest
If that is the case..
you may do a finish()
clear specific activity programmatically inside the MainActivity { .. }
to remove it from the activities stack, not in the Manifest.
This was in my case !