SliceViewManager

public abstract class SliceViewManager
extends Object

java.lang.Object
   ↳ androidx.slice.SliceViewManager


Class to handle interactions with Slices.

The SliceViewManager manages permissions and pinned state for slices.

Summary

Nested classes

interface SliceViewManager.SliceCallback

Class that listens to changes in Slices. 

Public methods

abstract Slice bindSlice(Intent intent)

Turns a slice intent into slice content.

abstract Slice bindSlice(Uri uri)

Turns a slice Uri into slice content.

static SliceViewManager getInstance(Context context)

Get a SliceViewManager.

abstract Collection<Uri> getSliceDescendants(Uri uri)

Obtains a list of slices that are descendants of the specified Uri.

abstract Uri mapIntentToUri(Intent intent)

Turns a slice intent into a slice uri.

abstract void pinSlice(Uri uri)

Ensures that a slice is in a pinned state.

abstract void registerSliceCallback(Uri uri, SliceViewManager.SliceCallback callback)

Adds a callback to a specific slice uri.

abstract void registerSliceCallback(Uri uri, Executor executor, SliceViewManager.SliceCallback callback)

Adds a callback to a specific slice uri.

abstract void unpinSlice(Uri uri)

Remove a pin for a slice.

abstract void unregisterSliceCallback(Uri uri, SliceViewManager.SliceCallback callback)

Removes a callback for a specific slice uri.

Inherited methods