Google is committed to advancing racial equity for Black communities. See how.

BroadcastReceiverWithCallbacks

abstract class BroadcastReceiverWithCallbacks<T : CallbackReceiver<Any!>!> : BroadcastReceiver, CallbackReceiver<T>, CallbackBase<T>
kotlin.Any
   ↳ android.content.BroadcastReceiver
   ↳ androidx.remotecallback.BroadcastReceiverWithCallbacks

Extend this broadcast receiver to be able to receive callbacks as well as normal broadcasts. Ensure that you call the super of onReceive(Context, Intent) when the action is ACTION_BROADCAST_CALLBACK.

Summary

Constants
static String

The action used for incoming RemoteCallbacks.

Public constructors

Extend this broadcast receiver to be able to receive callbacks as well as normal broadcasts.

Public methods
open T

open Unit
onReceive(context: Context!, intent: Intent!)

Constants

ACTION_BROADCAST_CALLBACK

static val ACTION_BROADCAST_CALLBACK: String

The action used for incoming RemoteCallbacks.

Value: "androidx.remotecallback.action.BROADCAST_CALLBACK"

Public constructors

<init>

BroadcastReceiverWithCallbacks()

Extend this broadcast receiver to be able to receive callbacks as well as normal broadcasts. Ensure that you call the super of onReceive(Context, Intent) when the action is ACTION_BROADCAST_CALLBACK.

Public methods

createRemoteCallback

open fun createRemoteCallback(context: Context!): T

onReceive

open fun onReceive(
    context: Context!,
    intent: Intent!
): Unit