ActivityCompat.requestPermissions not showing dialog box

前端 未结 20 1504
野趣味
野趣味 2020-12-07 17:15
if (ContextCompat.checkSelfPermission(RegisterActivity.this,      Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_DENIED){
            ActivityCom         


        
20条回答
  •  情话喂你
    2020-12-07 17:57

    Don't forget to write the permissions without extra spaces in the manifest. In my case i had:

    
    

    But look, at the end, there's an extra space. Just write it the right way

    
    

    And it's working now

提交回复
热议问题