belongs to Maven artifact androidx.slice:slice-view:1.0.0-alpha1

SliceLiveData

public final class SliceLiveData
extends Object

java.lang.Object
   ↳ androidx.slice.widget.SliceLiveData


Class with factory methods for creating LiveData that observes slices.

Summary

Public methods

static LiveData<Slice> fromIntent(Context context, Intent intent)

Produces an LiveData that tracks a Slice for a given Intent.

static LiveData<Slice> fromUri(Context context, Uri uri)

Produces an LiveData that tracks a Slice for a given Uri.

Inherited methods

Public methods

fromIntent

LiveData<Slice> fromIntent (Context context, 
                Intent intent)

Produces an LiveData that tracks a Slice for a given Intent. To use this method your app must have the permission to the slice Uri.

Parameters
context Context

intent Intent

Returns
LiveData<Slice>

fromUri

LiveData<Slice> fromUri (Context context, 
                Uri uri)

Produces an LiveData that tracks a Slice for a given Uri. To use this method your app must have the permission to the slice Uri.

Parameters
context Context

uri Uri

Returns
LiveData<Slice>