I want to get the permission to read SMS in my App. This is my code:
String permission = Manifest.permission.READ_SMS;
if (ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED){
permissionList.add(permission);
if (!ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), permission)){
requestPermissions(new String[]{permission}), SMS_PERMISSION);
}
}
I didn't get dialog to confirm the permission request. For other permissions (like WRITE_STORAGE
, READ_CONTACTS
) I got this dialog. Do you know how to fix it?
Method onRequestPermissionsResult
gives to me that permission isn't granted. But it works, without the confirmation dialog.
I need the <uses-permission-sdk-23/>
for confirm dialog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With