@RequiresApi(value = 19)
class Slice : 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

const 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
const val EXTRA_SELECTION = "android.app.slice.extra.SELECTION": String!

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

Public functions

getHints

Added in 1.1.0-alpha02
fun getHints(): (Mutable)List<String!>!
Returns
(Mutable)List<String!>!

All hints associated with this Slice.

getItems

Added in 1.1.0-alpha02
fun getItems(): (Mutable)List<SliceItem!>!
Returns
(Mutable)List<SliceItem!>!

All child SliceItems that this Slice contains.

getUri

Added in 1.1.0-alpha02
fun getUri(): Uri!
Returns
Uri!

The Uri that this Slice represents.

toString

fun toString(): String!
Returns
String!

A string representation of this slice.