Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 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 BroadcastReceiver.

static Int

Constant indicating this callback will be triggered on a ContentProvider.

Public methods
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 Int

Get the type of the receiver of this callback.

open String

Gets the class the callback will be called on.

open PendingIntent!

Create a PendingIntent that will trigger this callback.

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

Static version of CallbackReceiver#createRemoteCallback(Context).

Properties
static RemoteCallback!

Constant value that actual implementations of RemoteCallable should return.

Constants

TYPE_RECEIVER

static val TYPE_RECEIVER: Int

Constant indicating this callback will be triggered on a BroadcastReceiver.

Value: 0

TYPE_PROVIDER

static val TYPE_PROVIDER: Int

Constant indicating this callback will be triggered on a ContentProvider.

Value: 1

Public methods

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.

getType

open fun getType(): Int

Get the type of the receiver of this callback.

getReceiverClass

@NonNull open fun getReceiverClass(): String

Gets the class the callback will be called on.

toPendingIntent

open fun toPendingIntent(): PendingIntent!

Create a PendingIntent that will trigger this callback.

create

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

Static version of CallbackReceiver#createRemoteCallback(Context).

Properties

LOCAL

static val LOCAL: RemoteCallback!

Constant value that actual implementations of RemoteCallable should return.