Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. @Override
  2.     public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
  3.         switch (requestCode) {
  4.             case MY_PERMISSIONS_REQUEST_FILE_ACCESS:
  5.                 // if permission has not been granted
  6.                 if (grantResults.length > 0
  7.                         && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
  8.                     grantLocationPerms();
  9.                 } else {
  10.                     // ask the user to grant permissions manually
  11.                     manualPermissionDialog();
  12.                 }
  13.                 break;
  14.             ...
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement