@RequiresApi(value = 19)
public final class Slice implements VersionedParcelable


A slice is a piece of app content and actions that can be surfaced outside of the app. A slice is identified by a Uri and served via a SliceProvider.

Slices are constructed using androidx.slice.builders.TemplateSliceBuilders in a tree structure that provides the OS some information about how the content should be displayed.

Summary

Constants

static final String
EXTRA_SELECTION = "android.app.slice.extra.SELECTION"

Key to retrieve an extra added to an intent when an item in a selection is selected.

Constants

EXTRA_SELECTION

Added in 1.1.0-alpha02
public static final String EXTRA_SELECTION = "android.app.slice.extra.SELECTION"

Key to retrieve an extra added to an intent when an item in a selection is selected.

Public methods

getHints

Added in 1.1.0-alpha02
public List<StringgetHints()
Returns
List<String>

All hints associated with this Slice.

getItems

Added in 1.1.0-alpha02
public List<SliceItemgetItems()
Returns
List<SliceItem>

All child SliceItems that this Slice contains.

getUri

Added in 1.1.0-alpha02
public Uri getUri()
Returns
Uri

The Uri that this Slice represents.

toString

public String toString()
Returns
String

A string representation of this slice.