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 |
static Int |
Constant indicating this callback will be triggered on a |
Public methods | |
---|---|
open static T |
Static version of |
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 |
getType() Get the type of the receiver of this callback. |
open PendingIntent! |
Create a |
Properties | |
---|---|
static RemoteCallback! |
Constant value that actual implementations of |
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.
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.