ActivityCompat.OnRequestPermissionsResultCallback

Added in 1.1.0

interface ActivityCompat.OnRequestPermissionsResultCallback

Known direct subclasses
FragmentActivity

Base class for activities that want to use the support-based Fragments.

Known indirect subclasses
AppCompatActivity

Base class for activities that wish to use some of the newer platform features on older Android devices.

BaseCarAppActivity

Core logic for CarAppLibrary Activity interaction with a host.

CarAppActivity

The class representing a car app activity in the main display.

LauncherActivity

This class handles providing the right launcher activity when running native applications and Car App Library applications.


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

Summary

Public functions

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

Callback for the result from requesting permissions.

Public functions

onRequestPermissionsResult

Added in 1.1.0
fun onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String!>,
    grantResults: IntArray
): Unit

Callback for the result from requesting permissions. This method is invoked for every call on requestPermissions.

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 requestPermissions

permissions: Array<String!>

The requested permissions. Never null.

grantResults: IntArray

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