Share via


SliceManager.PinSlice(Uri, ICollection<SliceSpec>) Method

Definition

Ensures that a slice is in a pinned state.

[Android.Runtime.Register("pinSlice", "(Landroid/net/Uri;Ljava/util/Set;)V", "GetPinSlice_Landroid_net_Uri_Ljava_util_Set_Handler", ApiSince=28)]
public virtual void PinSlice (Android.Net.Uri uri, System.Collections.Generic.ICollection<Android.App.Slices.SliceSpec> specs);
[<Android.Runtime.Register("pinSlice", "(Landroid/net/Uri;Ljava/util/Set;)V", "GetPinSlice_Landroid_net_Uri_Ljava_util_Set_Handler", ApiSince=28)>]
abstract member PinSlice : Android.Net.Uri * System.Collections.Generic.ICollection<Android.App.Slices.SliceSpec> -> unit
override this.PinSlice : Android.Net.Uri * System.Collections.Generic.ICollection<Android.App.Slices.SliceSpec> -> unit

Parameters

uri
Uri

The uri of the slice being pinned.

specs
ICollection<SliceSpec>

The list of supported SliceSpecs of the callback.

Attributes

Remarks

Ensures that a slice is in a pinned state.

Pinned state is not persisted across reboots, so apps are expected to re-pin any slices they still care about after a reboot.

This may only be called by apps that are the default launcher for the device or the default voice interaction service. Otherwise will throw SecurityException.

Java documentation for android.app.slice.SliceManager.pinSlice(android.net.Uri, java.util.Set<android.app.slice.SliceSpec>).

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