belongs to Maven artifact com.android.support:support-media-compat:28.0.0-alpha1
MediaBrowserServiceCompat.Result
public
static
class
MediaBrowserServiceCompat.Result
extends Object
java.lang.Object | |
↳ | android.support.v4.media.MediaBrowserServiceCompat.Result<T> |
Completion handler for asynchronous callback methods in MediaBrowserServiceCompat
.
Each of the methods that takes one of these to send the result must call either
sendResult(T)
or sendError(Bundle)
to respond to the caller with the given results or
errors. If those functions return without calling sendResult(T)
or sendError(Bundle)
,
they must instead call detach()
before returning, and then may call
sendResult(T)
or sendError(Bundle)
when they are done. If sendResult(T)
,
sendError(Bundle)
, or detach()
is called twice, an exception will be thrown.
Those functions might also want to call sendProgressUpdate(Bundle)
to send interim updates
to the caller. If it is called after calling sendResult(T)
or sendError(Bundle)
, an
exception will be thrown.
See also:
Summary
Public methods | |
---|---|
void
|
detach()
Detach this message from the current thread and allow the |
void
|
sendError(Bundle extras)
Notify the caller of a failure. |
void
|
sendProgressUpdate(Bundle extras)
Send an interim update to the caller. |
void
|
sendResult(T result)
Send the result back to the caller. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public methods
detach
void detach ()
Detach this message from the current thread and allow the sendResult(T)
call to happen later.
sendError
void sendError (Bundle extras)
Notify the caller of a failure. This is supported only when it is used in
onCustomAction(String, Bundle, MediaBrowserServiceCompat.Result
.
Parameters | |
---|---|
extras |
Bundle : A bundle that contains extra data.
|
sendProgressUpdate
void sendProgressUpdate (Bundle extras)
Send an interim update to the caller. This method is supported only when it is used in
onCustomAction(String, Bundle, MediaBrowserServiceCompat.Result
.
Parameters | |
---|---|
extras |
Bundle : A bundle that contains extra data.
|
sendResult
void sendResult (T result)
Send the result back to the caller.
Parameters | |
---|---|
result |
T |
Classes
- AudioAttributesCompat
- AudioAttributesCompat.Builder
- MediaBrowserCompat
- MediaBrowserCompat.ConnectionCallback
- MediaBrowserCompat.CustomActionCallback
- MediaBrowserCompat.ItemCallback
- MediaBrowserCompat.MediaItem
- MediaBrowserCompat.SearchCallback
- MediaBrowserCompat.SubscriptionCallback
- MediaBrowserServiceCompat
- MediaBrowserServiceCompat.BrowserRoot
- MediaBrowserServiceCompat.Result
- MediaDescriptionCompat
- MediaDescriptionCompat.Builder
- MediaMetadataCompat
- MediaMetadataCompat.Builder
- RatingCompat
- VolumeProviderCompat
- VolumeProviderCompat.Callback