Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {
- boolean hasPermission = checkSelfPermission(Manifest.permission.XX)
- == PackageManager.PERMISSION_GRANTED;
- if(!hasPermission) {
- if(shouldShowRequestPermissionRationale(Manifest.permission.XX)) {
- // explain reason for permission, try again
- } else {
- // user deny with "don't show again"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement