Fragment.OnRequestPermissionsResult(Int32, String[], Permission[]) Method

Definition

Callback for the result from requesting permissions.

[Android.Runtime.Register("onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "GetOnRequestPermissionsResult_IarrayLjava_lang_String_arrayIHandler", ApiSince=23)]
public virtual void OnRequestPermissionsResult (int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults);
[<Android.Runtime.Register("onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "GetOnRequestPermissionsResult_IarrayLjava_lang_String_arrayIHandler", ApiSince=23)>]
abstract member OnRequestPermissionsResult : int * string[] * Android.Content.PM.Permission[] -> unit
override this.OnRequestPermissionsResult : int * string[] * Android.Content.PM.Permission[] -> unit

Parameters

requestCode
Int32

The request code passed in #requestPermissions(String[], int).

permissions
String[]

The requested permissions. Never null.

grantResults
Permission[]

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.

Attributes

Remarks

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

<strong>Note:</strong> 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.

Java documentation for android.app.Fragment.onRequestPermissionsResult(int, java.lang.String[], int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to