Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
- if (ActivityCompat.checkSelfPermission(this, permissions[0]) == PackageManager.PERMISSION_GRANTED) {
- if (requestCode == 1) {
- requestMediaFilePermission();
- }
- }
- // this else statment will run wen user click on dont ask again and deined the permission and still click on allow button
- else {
- Toast.makeText(this, "Enable Message permission from Setting", Toast.LENGTH_SHORT).show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement