The Android Developer Challenge is back! Submit your idea before December 2.

Slice

class Slice : CustomVersionedParcelable, VersionedParcelable
androidx.slice.Slice

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 String

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

Public methods

MutableList<String!>!

MutableList<SliceItem!>!

Uri!

String

Constants

EXTRA_SELECTION

static val EXTRA_SELECTION: String

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

Value: "android.app.slice.extra.SELECTION"

Public methods

getHints

fun getHints(): MutableList<String!>!
Return
MutableList<String!>!: All hints associated with this Slice.

getItems

fun getItems(): MutableList<SliceItem!>!
Return
MutableList<SliceItem!>!: All child SliceItems that this Slice contains.

getUri

fun getUri(): Uri!
Return
Uri!: The Uri that this Slice represents.

toString

fun toString(): String
Return
String: A string representation of this slice.