muzei-api / com.google.android.apps.muzei.api.provider / ProviderClient

ProviderClient

interface ProviderClient

Interface for interacting with a MuzeiArtProvider. Methods of this interface can be used directly within a MuzeiArtProvider or you can get an instance via ProviderContract.getProviderClient.

Properties

contentUri

Retrieve the content URI for the MuzeiArtProvider, allowing you to build custom queries, inserts, updates, and deletes using a ContentResolver.

abstract val contentUri: Uri

lastAddedArtwork

Retrieve the last added artwork from the MuzeiArtProvider.

abstract val lastAddedArtwork: Artwork?

Functions

addArtwork

Add a new piece of artwork to the MuzeiArtProvider.

abstract fun addArtwork(artwork: Artwork): Uri?

Add multiple artwork as a batch operation to the MuzeiArtProvider.

abstract fun addArtwork(artwork: Iterable<Artwork>): List<Uri>

setArtwork

Set the MuzeiArtProvider to only show the given artwork, deleting any other artwork previously added. Only in the cases where the artwork is successfully inserted will the other artwork be removed.

abstract fun setArtwork(artwork: Artwork): Uri?
abstract fun setArtwork(artwork: Iterable<Artwork>): List<Uri>

Inheritors

MuzeiArtProvider

Base class for a Muzei Live Wallpaper artwork provider. Art providers are a way for other apps to feed wallpapers (called artworks) to Muzei Live Wallpaper.

abstract class MuzeiArtProvider : ContentProvider, ProviderClient