Function

actionSendBroadcast

Creates an Action that launches the BroadcastReceiver specified by the given action.

actionSendBroadcast

Source set: Android
public fun actionSendBroadcast(action: String, componentName: ComponentName? = null): Action

Creates an Action that launches the BroadcastReceiver specified by the given action.

Parameters

action of the BroadcastReceiver to launch
componentName optional ComponentName of the target BroadcastReceiver

actionSendBroadcast

Source set: Android
public fun actionSendBroadcast(intent: Intent): Action

Creates an Action that launches a BroadcastReceiver from the given Intent when triggered. The intent should specify a component with Intent.setClass or Intent.setComponent.

Parameters

intent the Intent used to launch the BroadcastReceiver

actionSendBroadcast

Source set: Android
public fun actionSendBroadcast(componentName: ComponentName): Action

Creates an Action that launches the BroadcastReceiver specified by the given ComponentName.

Parameters

componentName component of the BroadcastReceiver to launch

actionSendBroadcast

Source set: Android
public fun <T : BroadcastReceiver> actionSendBroadcast(receiver: Class<T>): Action

Creates an Action that launches the specified BroadcastReceiver when triggered.

Parameters

receiver class of the BroadcastReceiver to launch

actionSendBroadcast

Source set: Android
@Suppress("MissingNullability") // Shouldn't need to specify @NonNull. b/199284086
public inline fun <reified T : BroadcastReceiver> actionSendBroadcast(): Action

Creates an Action that launches the specified BroadcastReceiver when triggered.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: