CloudMediaProvider.CloudMediaSurfaceStateChangedCallback


public static final class CloudMediaProvider.CloudMediaSurfaceStateChangedCallback
extends Object

java.lang.Object
   ↳ android.provider.CloudMediaProvider.CloudMediaSurfaceStateChangedCallback


This class is used by CloudMediaProvider to send Surface state updates to picker launched via MediaStore.ACTION_PICK_IMAGES.

Summary

Constants

int PLAYBACK_STATE_BUFFERING

Constant to notify that the playback is buffering

int PLAYBACK_STATE_COMPLETED

Constant to notify that the playback has completed

int PLAYBACK_STATE_ERROR_PERMANENT_FAILURE

Constant to notify that the playback has failed with a permanent error.

int PLAYBACK_STATE_ERROR_RETRIABLE_FAILURE

Constant to notify that the playback has failed with a retriable error.

int PLAYBACK_STATE_MEDIA_SIZE_CHANGED

Constant to notify that the media size is first known or has changed.

int PLAYBACK_STATE_PAUSED

Constant to notify that the playback is paused.

int PLAYBACK_STATE_READY

Constant to notify that the playback is ready to be played

int PLAYBACK_STATE_STARTED

Constant to notify that the playback has started

Public methods

void setPlaybackState(int surfaceId, int playbackState, Bundle playbackStateInfo)

This is called to notify playback state update for a Surface on the picker launched via MediaStore.ACTION_PICK_IMAGES.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

PLAYBACK_STATE_BUFFERING

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_BUFFERING

Constant to notify that the playback is buffering

Constant Value: 1 (0x00000001)

PLAYBACK_STATE_COMPLETED

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_COMPLETED

Constant to notify that the playback has completed

Constant Value: 5 (0x00000005)

PLAYBACK_STATE_ERROR_PERMANENT_FAILURE

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_ERROR_PERMANENT_FAILURE

Constant to notify that the playback has failed with a permanent error.

Constant Value: 7 (0x00000007)

PLAYBACK_STATE_ERROR_RETRIABLE_FAILURE

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_ERROR_RETRIABLE_FAILURE

Constant to notify that the playback has failed with a retriable error.

Constant Value: 6 (0x00000006)

PLAYBACK_STATE_MEDIA_SIZE_CHANGED

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_MEDIA_SIZE_CHANGED

Constant to notify that the media size is first known or has changed. Pass the width and height of the media as a Point inside the Bundle with ContentResolver.EXTRA_SIZE as the key.

Constant Value: 8 (0x00000008)

PLAYBACK_STATE_PAUSED

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_PAUSED

Constant to notify that the playback is paused.

Constant Value: 4 (0x00000004)

PLAYBACK_STATE_READY

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_READY

Constant to notify that the playback is ready to be played

Constant Value: 2 (0x00000002)

PLAYBACK_STATE_STARTED

Added in API level 33
Also in R Extensions 3
public static final int PLAYBACK_STATE_STARTED

Constant to notify that the playback has started

Constant Value: 3 (0x00000003)

Public methods

setPlaybackState

Added in API level 33
Also in R Extensions 3
public void setPlaybackState (int surfaceId, 
                int playbackState, 
                Bundle playbackStateInfo)

This is called to notify playback state update for a Surface on the picker launched via MediaStore.ACTION_PICK_IMAGES.

Parameters
surfaceId int: id which uniquely identifies a Surface

playbackState int: playback state to notify picker about Value is either 0 or a combination of PLAYBACK_STATE_BUFFERING, PLAYBACK_STATE_READY, PLAYBACK_STATE_STARTED, PLAYBACK_STATE_PAUSED, PLAYBACK_STATE_COMPLETED, PLAYBACK_STATE_ERROR_RETRIABLE_FAILURE, PLAYBACK_STATE_ERROR_PERMANENT_FAILURE, and PLAYBACK_STATE_MEDIA_SIZE_CHANGED

playbackStateInfo Bundle: Bundle which may contain extra information about the playback state, such as media size, progress/seek info or details about errors. This value may be null.