Most visited

Recently visited

ActivityCompat.OnRequestPermissionsResultCallback

public static interface ActivityCompat.OnRequestPermissionsResultCallback

android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback
Known Indirect Subclasses


该接口是用于接收许可请求结果的合同。

Summary

Public methods

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

从请求权限回调结果。

Public methods

onRequestPermissionsResult

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

从请求权限回调结果。 对于requestPermissions(android.app.Activity, String[], int)上的每个调用都会调用此方法。

注意:与用户的权限请求交互可能会中断。 在这种情况下,您将收到空权限和结果数组,这些数据应视为取消。

Parameters
requestCode int: The request code passed in 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 PERMISSION_GRANTED or PERMISSION_DENIED. Never null.

也可以看看:

Hooray!