muzei-api / com.google.android.apps.muzei.api.provider / MuzeiArtProvider / openFile

openFile

open fun openFile(artwork: Artwork): InputStream

Provide an InputStream to the binary data associated with artwork that has not yet been cached. The default implementation retrieves the image from the persistent URI and supports URI schemes in the following formats:

Throwing any exception other than an IOException will be considered a permanent error that will result in a call to onInvalidArtwork.

Parameters

artwork - The Artwork to open

Exceptions

IOException - if an error occurs while opening the image. The request will be retried automatically.

Return
A valid InputStream for the artwork's image