![]() Transport state to STATE_ERROR and specify an associated error with setErrorMessage(int, CharSequence).Īs long as playback is blocked by the error, the PlaybackState should continueĪ non-fatal error occurs when your app cannot handle a request, but can continue to play: Whenever playback is interrupted, you should generate a fatal error: Set the Playback state of the session ( getState())Īnd, when necessary, an associated error code ( getErrorCode()). Note that PlaybackState is an object that contains separate values for the To reduce overall memory consumption from these frequent operations, it's a good idea to create the builders once and to reuse them throughout the life of the session. Every time the state or metadata changes, you must use the corresponding builder for each class, PlaybackStateCompat.Builder() or MediaMetadataCompat.Builder(), and then pass the new instance to the media session by calling The player state and metadata can change over the life of a media session. An instance of ContentUris that points to a larger version of the artwork. ![]() The image is a bitmap with a maximum size of 320x320dp (if larger, it's scaled down).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |