Added in API level 21

Result


open class Result<T : Any!>
kotlin.Any
   ↳ android.service.media.MediaBrowserService.Result

Completion handler for asynchronous callback methods in MediaBrowserService.

Each of the methods that takes one of these to send the result must call sendResult to respond to the caller with the given results. If those functions return without calling sendResult, they must instead call detach before returning, and then may call sendResult when they are done. If more than one of those methods is called, an exception will be thrown.

Summary

Public methods
open Unit

Detach this message from the current thread and allow the sendResult call to happen later.

open Unit
sendResult(result: T)

Send the result back to the caller.

Public methods

detach

Added in API level 21
open fun detach(): Unit

Detach this message from the current thread and allow the sendResult call to happen later.

sendResult

Added in API level 21
open fun sendResult(result: T): Unit

Send the result back to the caller.