Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

OnRequestPermissionsResultCallback

interface OnRequestPermissionsResultCallback
androidx.legacy.app.FragmentCompat.OnRequestPermissionsResultCallback

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

Summary

Public methods
abstract Unit
onRequestPermissionsResult(requestCode: Int, @NonNull permissions: Array<String!>, @NonNull grantResults: IntArray)

Callback for the result from requesting permissions.

Public methods

onRequestPermissionsResult

abstract fun onRequestPermissionsResult(requestCode: Int, @NonNull permissions: Array<String!>, @NonNull grantResults: IntArray): Unit

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

Parameters
requestCode Int: The request code passed in requestPermissions( * android.app.Fragment, String[], int)
permissions Int: The requested permissions. Never null.
grantResults Int: The grant results for the corresponding permissions which is either android.content.pm.PackageManager#PERMISSION_GRANTED or android.content.pm.PackageManager#PERMISSION_DENIED. Never null.