---
title: "actionSendBroadcast"
description: "Creates an [Action] that launches the [BroadcastReceiver] specified by the given action."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
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 |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
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` |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
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 |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
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 |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
public inline fun <reified T : BroadcastReceiver> actionSendBroadcast(): Action
```


Creates an `Action` that launches the specified `BroadcastReceiver` when triggered.



