actionSendBroadcast

Function

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

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

Parameters

actionof the BroadcastReceiver to launch
componentNameoptional ComponentName of the target BroadcastReceiver
Android
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

intentthe Intent used to launch the BroadcastReceiver
Android
fun actionSendBroadcast(componentName: ComponentName): Action

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

Parameters

componentNamecomponent of the BroadcastReceiver to launch
Android
fun <T : BroadcastReceiver> actionSendBroadcast(receiver: Class<T>): Action

Creates an Action that launches the specified BroadcastReceiver when triggered.

Parameters

receiverclass of the BroadcastReceiver to launch
Android
inline fun <reified T : BroadcastReceiver> actionSendBroadcast(): Action

Creates an Action that launches the specified BroadcastReceiver when triggered.