Share via


SliceProvider.OnMapIntentToUri(Intent) Method

Definition

This method must be overridden if an IntentFilter is specified on the SliceProvider.

[Android.Runtime.Register("onMapIntentToUri", "(Landroid/content/Intent;)Landroid/net/Uri;", "GetOnMapIntentToUri_Landroid_content_Intent_Handler", ApiSince=28)]
public virtual Android.Net.Uri OnMapIntentToUri (Android.Content.Intent? intent);
[<Android.Runtime.Register("onMapIntentToUri", "(Landroid/content/Intent;)Landroid/net/Uri;", "GetOnMapIntentToUri_Landroid_content_Intent_Handler", ApiSince=28)>]
abstract member OnMapIntentToUri : Android.Content.Intent -> Android.Net.Uri
override this.OnMapIntentToUri : Android.Content.Intent -> Android.Net.Uri

Parameters

intent
Intent

Returns

Uri

Uri representing the slice associated with the provided intent.

Attributes

Remarks

This method must be overridden if an IntentFilter is specified on the SliceProvider. In that case, this method can be called and is expected to return a non-null Uri representing a slice. Otherwise this will throw UnsupportedOperationException.

Any intent filter added to a slice provider should also contain SliceManager#CATEGORY_SLICE, because otherwise it will not be detected by SliceManager#mapIntentToUri(Intent).

Java documentation for android.app.slice.SliceProvider.onMapIntentToUri(android.content.Intent).

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