belongs to Maven artifact androidx.core:core:1.0.0-alpha1

ActivityCompat.OnRequestPermissionsResultCallback

public static interface ActivityCompat.OnRequestPermissionsResultCallback

androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback


This interface is the contract for receiving the results for permission requests.

Summary

Public methods

abstract void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)

Callback for the result from requesting permissions.

Public methods

onRequestPermissionsResult

void onRequestPermissionsResult (int requestCode, 
                String[] permissions, 
                int[] grantResults)

Callback for the result from requesting permissions. This method is invoked for every call on ActivityCompat.requestPermissions(android.app.Activity, String[], int).

Note: It is possible that the permissions request interaction with the user is interrupted. In this case you will receive empty permissions and results arrays which should be treated as a cancellation.

Parameters
requestCode int: The request code passed in ActivityCompat.requestPermissions(android.app.Activity, String[], int)

permissions String: The requested permissions. Never null.

grantResults int: The grant results for the corresponding permissions which is either PackageManager.PERMISSION_GRANTED or PackageManager.PERMISSION_DENIED. Never null.