[**react-native-notify-kit**](react-native/reference/index)

---

[react-native-notify-kit](react-native/reference/index) / NotificationPressAction

# Interface: NotificationPressAction

Defined in: [packages/react-native/src/types/Notification.ts:234](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/Notification.ts#L234)

The interface used to describe a press action for a notification.

There are various ways a user can interact with a notification, the most common being pressing
the notification, pressing an action or providing text input. This interface defines what happens
when a user performs such interaction.

On Android; when provided to a notification action, the action will only open you application if
a `launchActivity` and/or a `mainComponent` is provided.

## Properties

### id

> **id**: `string`

Defined in: [packages/react-native/src/types/Notification.ts:241](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/Notification.ts#L241)

The unique ID for the action.

The `id` property is used to differentiate between user press actions. When listening to notification
events, the ID can be read from the `event.detail.pressAction` object.

---

### launchActivity?

> `optional` **launchActivity?**: `string`

Defined in: [packages/react-native/src/types/Notification.ts:253](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/Notification.ts#L253)

The custom Android Activity to launch on a press action.

This property can be used in advanced scenarios to launch a custom Android Activity when the user
performs a press action.

View the [Android Interaction](/react-native/android/interaction) docs to learn more.

#### Platform

android

---

### launchActivityFlags?

> `optional` **launchActivityFlags?**: [`AndroidLaunchActivityFlag`](react-native/reference/Enumeration.AndroidLaunchActivityFlag)\[]

Defined in: [packages/react-native/src/types/Notification.ts:262](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/Notification.ts#L262)

Custom flags that are added to the Android [Intent](https://developer.android.com/reference/android/content/Intent.html) that launches your Activity.

These are only required if you need to customise the behaviour of how your activities are launched; by default these are not required.

#### Platform

android

---

### mainComponent?

> `optional` **mainComponent?**: `string`

Defined in: [packages/react-native/src/types/Notification.ts:274](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/Notification.ts#L274)

A custom registered React component to launch on press action.

This property can be used to open a custom React component when the user performs a press action.
For this to correctly function on Android, a minor native code change is required.

View the [Press Action](/react-native/android/interaction#press-action) document to learn more.

#### Platform

android
