public class 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 final RemoteCallback

Constant value that actual implementations of RemoteCallable should return.

static final int

Constant indicating this callback will be triggered on a ContentProvider.

static final int

Constant indicating this callback will be triggered on a BroadcastReceiver.

Public methods

static T
<T extends CallbackReceiver> create(Class<T> cls, Context context)

Static version of createRemoteCallback.

Bundle

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

String

Gets the name of the method this callback will call.

@NonNull String

Gets the class the callback will be called on.

int

Get the type of the receiver of this callback.

PendingIntent

Create a PendingIntent that will trigger this callback.

Constants

LOCAL

Added in 1.0.0-alpha02
public static final RemoteCallback LOCAL

Constant value that actual implementations of RemoteCallable should return.

TYPE_PROVIDER

Added in 1.0.0-alpha02
public static final int TYPE_PROVIDER = 1

Constant indicating this callback will be triggered on a ContentProvider.

TYPE_RECEIVER

Added in 1.0.0-alpha02
public static final int TYPE_RECEIVER = 0

Constant indicating this callback will be triggered on a BroadcastReceiver.

Public methods

create

Added in 1.0.0-alpha02
public static T <T extends CallbackReceiver> create(Class<T> cls, Context context)

Static version of createRemoteCallback.

getArgumentBundle

Added in 1.0.0-alpha02
public Bundle getArgumentBundle()

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

getMethodName

Added in 1.0.0-alpha02
public String getMethodName()

Gets the name of the method this callback will call.

getReceiverClass

Added in 1.0.0-alpha02
public @NonNull String getReceiverClass()

Gets the class the callback will be called on.

getType

Added in 1.0.0-alpha02
public int getType()

Get the type of the receiver of this callback.

toPendingIntent

Added in 1.0.0-alpha02
public PendingIntent toPendingIntent()

Create a PendingIntent that will trigger this callback.