How to add notification actions to your Expo app, in short
Install expo-notifications with npx expo install expo-notifications. At startup, register a category: await Notifications.setNotificationCategoryAsync('reminder', [{ identifier: 'done', buttonTitle: 'Done' }, { identifier: 'snooze', buttonTitle: 'Snooze 10 min' }]). When you schedule or send a notification, add categoryIdentifier: 'reminder' to its content. Then listen with Notifications.addNotificationResponseReceivedListener and switch on response.actionIdentifier.
Actions turn a notification from a doorbell into a remote control. Without them, every notification asks the user to open your app. With them, the user can mark a habit done, snooze a reminder or reply to a message straight from the lock screen. For a reminder or habit app, that is often the difference between a notification that gets acted on and one that gets swiped away.
How categories and actions fit together
There are three pieces, and mixing them up is where most bugs come from.
The three pieces of an interactive notification
| Piece | What it is | Where it lives |
|---|---|---|
| Action | One button: an identifier, a buttonTitle, and optional textInput and options | Inside a category's actions array |
| Category | A named set of actions, registered once with setNotificationCategoryAsync | Registered on the device at app startup |
| categoryIdentifier | The category's name, set on a notification so it shows that category's buttons | In the notification content (local) or categoryId (push) |
The category is registered on the device, not sent with each notification. The notification only carries the category's name. If the name does not match a registered category, the notification still shows, just with no buttons. That is the single most common reason action buttons are missing.
Every action option, and when to use it
NotificationAction fields in expo-notifications
| Field | What it does | Use it for |
|---|---|---|
| identifier | The string your app receives as actionIdentifier when this button is pressed | Switching on which button the user chose |
| buttonTitle | The text on the button | A short verb phrase, like Mark done or Reply |
| textInput: { placeholder, submitButtonTitle } | Turns the button into a text reply field | Quick replies to messages or comments |
| options.opensAppToForeground | Whether pressing the button brings your app to the foreground | true for actions that need more input in the app, false for one-tap actions |
| options.isDestructive | Marks the action as destructive. On iOS the button gets special highlighting | Delete, cancel or other actions that remove data |
| options.isAuthenticationRequired | On iOS, the action can only be performed on an unlocked device, so the user is asked to unlock first | Anything that touches private data or money |
opensAppToForeground deserves a moment of thought. On iOS, the foreground option is meant for actions that need the user to keep interacting with your app, not as a way to get your app opened. So a Reply that just posts the text should not open the app, while a "View order" button should. For a one-tap action like Mark done, set it to false so the user stays where they were.
isAuthenticationRequired is cheap insurance. If an action deletes something, sends something on the user's behalf, or exposes anything private, require an unlocked device. Anyone who picks up a locked phone can press a button on the lock screen.
Step 2: Attach the category to a notification
For a local notification, add categoryIdentifier to the content you pass to scheduleNotificationAsync. I also put the ID of the thing the notification is about in data, because the button handler will need it:
For a push notification sent through the Expo push service, the field is called categoryId instead, and it is supported on Android and iOS. Send it alongside to, title, body and data. The category still has to be registered on the device by your app, so if you add a new category for push, ship the app update that registers it before your server starts sending it. Our guide to adding push notifications to your Expo app covers the sending side.
Handling actions when the app was closed
A live listener only hears responses while your JavaScript is running. If the user presses a button that opens your app from a closed state, the response can arrive before your listener is attached. So handle it in two places: on startup, call Notifications.getLastNotificationResponse() and process the response if there is one, then call Notifications.clearLastNotificationResponse() so it is not handled twice on the next render. In components, the useLastNotificationResponse() hook does the same job. It returns undefined while it is still working out the answer, null if there has been no response, or the response itself.
Older code uses getLastNotificationResponseAsync and clearLastNotificationResponseAsync. Both are deprecated in favor of the versions without Async.
Actions that do not open the app are the harder case. On Android, a background notification task registered with Notifications.registerTaskAsync also runs in response to a notification action tap when the app is backgrounded or terminated. That task is defined with expo-task-manager in the module scope of a file loaded early, such as index.ts. That Android-only behavior is why I keep one-tap actions small and idempotent, and why I set opensAppToForeground: true for anything where a lost press would actually hurt. Our guide to running background tasks in your Expo app covers task setup.
iOS-only category options
The third argument to setNotificationCategoryAsync is a NotificationCategoryOptions object. Every field in it is iOS only.
| Option | What it does |
|---|---|
| previewPlaceholder | Text shown instead of the content when the user has turned off notification previews. Defaults to the system's Notification label |
| showTitle / showSubtitle | Show the title or subtitle even when previews are off. Both default to false |
| customDismissAction | Sends your app a response when the user explicitly dismisses the notification. Ignoring it or flicking a banner away does not count |
| categorySummaryFormat | The summary text used when iOS groups several of this category's notifications together |
| allowInCarPlay | Lets CarPlay show these notifications. Only for apps approved for CarPlay |
| intentIdentifiers | Siri intent identifiers, for notifications related to a request made through Siri |
previewPlaceholder is the one most apps should set. With previews off, a reminder app's notification just says Notification, and the user has no idea whether the buttons are worth pressing. Something like "Daily reminder" tells them enough without revealing the content. allowAnnouncement still appears in the types, but it is deprecated and ignored by iOS.
Have Claude Code wire up notification actions for you
Open your project in the Claude Code desktop app and describe the categories, the buttons and where the handling lives:
Then test it on real devices, not just the simulator: press each button with the app open, in the background and fully closed, on both iOS and Android. Turn off notification previews on the iPhone and check the placeholder. Add a line to your CLAUDE.md such as "Notification categories: only src/lib/notificationActions.ts registers categories or handles responses" so a later session does not add a second listener that handles every action twice.
The short version
Notification actions in Expo come down to one registration call, one field on the notification and one listener. Register categories at startup with safe identifiers, attach them with categoryIdentifier (or categoryId for push), switch on actionIdentifier, handle the launch case with getLastNotificationResponse, and make every handler safe to run twice. The buttons themselves are easy. The care goes into the closed-app case, which is exactly the case your users hit most.
If you are building your first iOS app with Claude Code and Expo and want help getting features like this right before launch, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the curriculum covers the full path from first build to first users. Pair this with our guides to scheduling local notifications, adding push notifications and setting the app icon badge count in your Expo app. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
How do I add action buttons to a notification in Expo?
Register a category with Notifications.setNotificationCategoryAsync(identifier, actions), where each action has an identifier and a buttonTitle. Then set categoryIdentifier to that identifier in the notification content. The notification shows the category's buttons.
How do I know which notification button the user pressed?
Add a listener with Notifications.addNotificationResponseReceivedListener. The NotificationResponse it receives has an actionIdentifier that matches the identifier of the pressed action. If the user tapped the notification itself, actionIdentifier equals Notifications.DEFAULT_ACTION_IDENTIFIER.
How do I add a reply field to an Expo notification?
Give the action a textInput object with a placeholder and a submitButtonTitle. When the user submits, the NotificationResponse includes the typed text in userText.
Do notification categories work with push notifications in Expo?
Yes. When sending through the Expo push service, set categoryId in the message. It is supported on Android and iOS. The category must already be registered on the device by your app with setNotificationCategoryAsync.
Why are my Expo notification action buttons not showing?
Usually the categoryIdentifier does not match a registered category, the category was registered after the notification arrived, or the identifier contains : or -, which should not be used in category identifiers. For push, check that the payload uses categoryId.
How do I handle a notification action when the app was closed?
On startup, call Notifications.getLastNotificationResponse() (or use the useLastNotificationResponse hook) and process the response, then call clearLastNotificationResponse(). On Android, a task registered with Notifications.registerTaskAsync also runs for action taps when the app is backgrounded or terminated. For actions that must not be lost, set opensAppToForeground to true.
Last reviewed by David on November 28, 2026


