SliceLiveData.CachedSliceLiveData

public static class SliceLiveData.CachedSliceLiveData
extends LiveData<Slice>

java.lang.Object
   ↳ androidx.lifecycle.LiveData<androidx.slice.Slice>
     ↳ androidx.slice.widget.SliceLiveData.CachedSliceLiveData


Implementation of LiveData that provides controls over how cached vs live slices work.

Summary

Public methods

void goLive()

Moves this CachedSliceLiveData into a "live" state, causing the providing app to start up and provide an up to date version of the slice.

void parseStream()

Generally the InputStream are parsed asynchronously once the LiveData goes into the active state.

Protected methods

void onActive()

Called when the number of active observers change from 0 to 1.

void onInactive()

Called when the number of active observers change from 1 to 0.

Inherited methods