ActivityCompat.OnRequestPermissionsResultCallback

Added in 1.1.0

public 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 methods

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

Callback for the result from requesting permissions.

Public methods

onRequestPermissionsResult

Added in 1.1.0
abstract void onRequestPermissionsResult(
    int requestCode,
    @NonNull String[] permissions,
    @NonNull int[] grantResults
)

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
int requestCode

The request code passed in requestPermissions

@NonNull String[] permissions

The requested permissions. Never null.

@NonNull int[] grantResults

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