Udostępnij za pośrednictwem


UiAutomation.GrantRuntimePermissionAsUser(String, String, UserHandle) Method

Definition

Grants a runtime permission to a package for a user.

[Android.Runtime.Register("grantRuntimePermissionAsUser", "(Ljava/lang/String;Ljava/lang/String;Landroid/os/UserHandle;)V", "", ApiSince=28)]
public void GrantRuntimePermissionAsUser (string? packageName, string? permission, Android.OS.UserHandle? userHandle);
[<Android.Runtime.Register("grantRuntimePermissionAsUser", "(Ljava/lang/String;Ljava/lang/String;Landroid/os/UserHandle;)V", "", ApiSince=28)>]
member this.GrantRuntimePermissionAsUser : string * string * Android.OS.UserHandle -> unit

Parameters

packageName
String

The package to which to grant.

permission
String

The permission to grant.

userHandle
UserHandle
Attributes

Remarks

Grants a runtime permission to a package for a user.

Java documentation for android.app.UiAutomation.grantRuntimePermissionAsUser(java.lang.String, java.lang.String, android.os.UserHandle).

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