Android “onRequestPermissionsResult” not being called

前端 未结 3 669
旧巷少年郎
旧巷少年郎 2021-01-21 16:42

I\'m trying to implement Marshmallow\'s permission support, but my code inside \"onRequestPermissionsResult\" is never called. The \"onCreate\" and \"onMapReady\" parts of the c

3条回答
  •  抹茶落季
    2021-01-21 17:34

    I have the same issue, the issue was only on API 23 (Android M). And that because I was using the flag android:noHistory="true" in the manifest when declaring the activity:

    
                
                    
                    
                
    
    

    That because when showing the permission dialog the activity will be finished by the system because of that flag.

    Removing it, or setting it to false fixes my issue.

提交回复
热议问题