Compartir a través de


SliceProvider.OnCreatePermissionRequest(Uri) Method

Definition

Called when an app requests a slice it does not have write permission to the uri for.

[Android.Runtime.Register("onCreatePermissionRequest", "(Landroid/net/Uri;)Landroid/app/PendingIntent;", "GetOnCreatePermissionRequest_Landroid_net_Uri_Handler", ApiSince=28)]
public virtual Android.App.PendingIntent OnCreatePermissionRequest (Android.Net.Uri? sliceUri);
[<Android.Runtime.Register("onCreatePermissionRequest", "(Landroid/net/Uri;)Landroid/app/PendingIntent;", "GetOnCreatePermissionRequest_Landroid_net_Uri_Handler", ApiSince=28)>]
abstract member OnCreatePermissionRequest : Android.Net.Uri -> Android.App.PendingIntent
override this.OnCreatePermissionRequest : Android.Net.Uri -> Android.App.PendingIntent

Parameters

sliceUri
Uri

the Uri of the slice attempting to be bound.

Returns

Attributes

Remarks

Called when an app requests a slice it does not have write permission to the uri for.

The return value will be the action on a slice that prompts the user that the calling app wants to show slices from this app. The default implementation launches a dialog that allows the user to grant access to this slice. Apps that do not want to allow this user grant, can override this and instead launch their own dialog with different behavior.

Java documentation for android.app.slice.SliceProvider.onCreatePermissionRequest(android.net.Uri).

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