I recently came across this problem and almost pulled my hair out. Whenever my application ran for the first time - on Marshmallow (API 23) or above - my application would ask for a few run time permissions.
As soon as the native runtime permissions dialogue appeared, the actual activity behind would finish.
I will be answering the solution myself
Make sure that android:noHistory
attribute of the calling activity's entry in AndroidManifest.xml
is NOT set to true
. By default, it is false. But in case you have set it to true, the above issue will be produced