Register now for Android Dev Summit 2019!

RemoteCallback

open class RemoteCallback
kotlin.Any
   ↳ androidx.remotecallback.RemoteCallback

An instance of a callback to a specific class/method with a specific set of arguments. Can only be obtained from a CallbackReceiver.

Summary

Constants

static Int

Constant indicating this callback will be triggered on a ContentProvider.

static Int

Constant indicating this callback will be triggered on a BroadcastReceiver.

Public methods

open static T
create(cls: Class<T>!, context: Context!)

Static version of CallbackReceiver#createRemoteCallback(Context).

open Bundle!

Gets the bundle of arguments that will be used to trigger the method.

open String!

Gets the name of the method this callback will call.

open String

Gets the class the callback will be called on.

open Int

Get the type of the receiver of this callback.

open PendingIntent!

Create a PendingIntent that will trigger this callback.

Properties

static RemoteCallback!

Constant value that actual implementations of RemoteCallable should return.

Constants

TYPE_PROVIDER

static val TYPE_PROVIDER: Int

Constant indicating this callback will be triggered on a ContentProvider.

Value: 1

TYPE_RECEIVER

static val TYPE_RECEIVER: Int

Constant indicating this callback will be triggered on a BroadcastReceiver.

Value: 0

Public methods

create

open static fun <T : CallbackReceiver<Any!>!> create(cls: Class<T>!, context: Context!): T

Static version of CallbackReceiver#createRemoteCallback(Context).

getArgumentBundle

open fun getArgumentBundle(): Bundle!

Gets the bundle of arguments that will be used to trigger the method.

getMethodName

open fun getMethodName(): String!

Gets the name of the method this callback will call.

getReceiverClass

@NonNull open fun getReceiverClass(): String

Gets the class the callback will be called on.

getType

open fun getType(): Int

Get the type of the receiver of this callback.

toPendingIntent

open fun toPendingIntent(): PendingIntent!

Create a PendingIntent that will trigger this callback.

Properties

LOCAL

static val LOCAL: RemoteCallback!

Constant value that actual implementations of RemoteCallable should return.