How to Add Notification Actions to Your Expo App

DavidDavid November 28, 2026 8 min read
A smartphone on a dark walnut desk showing a notification card with two rounded buttons beneath it, next to a ceramic coffee cup and a folded paper note in warm lamp light
Original image, App Store Launch Club

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

PieceWhat it isWhere it lives
ActionOne button: an identifier, a buttonTitle, and optional textInput and optionsInside a category's actions array
CategoryA named set of actions, registered once with setNotificationCategoryAsyncRegistered on the device at app startup
categoryIdentifierThe category's name, set on a notification so it shows that category's buttonsIn 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.

Step 1: Register a category with action buttons

Call setNotificationCategoryAsync early, in the same startup code that sets your notification handler, so the category exists before any notification that needs it arrives. It takes the category identifier, an array of actions, and an optional options object. It works on both Android and iOS and resolves to the category it created.

Each action needs an identifier, which comes back to you when the button is pressed, and a buttonTitle, which is what the user reads. Keep titles short and specific. "Mark done" beats "OK" because the user knows exactly what pressing it will do without opening the app.

To check what is registered, call getNotificationCategoriesAsync(). To remove a category, call deleteNotificationCategoryAsync(identifier), which resolves to false if no category with that identifier exists. Calling setNotificationCategoryAsync again with the same identifier is how you change a category's buttons, for example when you translate the titles.

Every action option, and when to use it

NotificationAction fields in expo-notifications

FieldWhat it doesUse it for
identifierThe string your app receives as actionIdentifier when this button is pressedSwitching on which button the user chose
buttonTitleThe text on the buttonA short verb phrase, like Mark done or Reply
textInput: { placeholder, submitButtonTitle }Turns the button into a text reply fieldQuick replies to messages or comments
options.opensAppToForegroundWhether pressing the button brings your app to the foregroundtrue for actions that need more input in the app, false for one-tap actions
options.isDestructiveMarks the action as destructive. On iOS the button gets special highlightingDelete, cancel or other actions that remove data
options.isAuthenticationRequiredOn iOS, the action can only be performed on an unlocked device, so the user is asked to unlock firstAnything 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.

Step 3: Handle the button press

Every interaction with a notification, whether a plain tap or a button press, arrives as a NotificationResponse. It has three fields you care about: actionIdentifier (which button), notification (the original notification, including your data), and userText (what the user typed, for text input actions).

  1. Add a listener with Notifications.addNotificationResponseReceivedListener(response => { ... }) in your root layout, and call subscription.remove() when it unmounts.
  2. Read const id = response.notification.request.content.data.reminderId so you know which reminder the button belongs to.
  3. Switch on response.actionIdentifier: 'done' marks the reminder done, 'snooze' schedules a one-off TIME_INTERVAL notification 600 seconds out with the same category, 'reply' reads response.userText.
  4. If actionIdentifier equals Notifications.DEFAULT_ACTION_IDENTIFIER, the user tapped the notification itself rather than a button. Navigate to the relevant screen.
  5. Dismiss the delivered notification with Notifications.dismissNotificationAsync(response.notification.request.identifier) once the action is handled, so a done reminder does not linger in the tray.

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.

OptionWhat it does
previewPlaceholderText shown instead of the content when the user has turned off notification previews. Defaults to the system's Notification label
showTitle / showSubtitleShow the title or subtitle even when previews are off. Both default to false
customDismissActionSends your app a response when the user explicitly dismisses the notification. Ignoring it or flicking a banner away does not count
categorySummaryFormatThe summary text used when iOS groups several of this category's notifications together
allowInCarPlayLets CarPlay show these notifications. Only for apps approved for CarPlay
intentIdentifiersSiri 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.

Why your notification action buttons are not showing

SymptomMost likely cause
Notification shows but has no buttonscategoryIdentifier does not match a registered category, or the category was registered after the notification arrived
Buttons behave unpredictably or not at allThe category identifier contains : or -. Rename it to letters, numbers and underscores
Push notifications have no buttonsThe push payload uses categoryIdentifier instead of categoryId, or the installed app version never registered that category
Button press does nothing when the app was closedOnly a live listener is handling responses. Add getLastNotificationResponse on startup, or open the app for important actions
The same action runs twiceThe last notification response was never cleared after handling it
Every tap is treated like a buttonNot checking for Notifications.DEFAULT_ACTION_IDENTIFIER, which means the notification itself was tapped
Reply action sends empty messagesuserText was not checked before sending

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.

Free app-building tips, straight to your inbox

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

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article
ExpoClaude Code

How to Set the App Icon Badge Count in Your Expo App

To set the app icon badge count in an Expo app, install expo-notifications, request notification permission with badges allowed, then call setBadgeCountAsync with the number you want and setBadgeCountAsync(0) to clear it. Here is how the badge behaves on iPhone and Android, how to keep it in sync with push notifications, why it silently fails, and a Claude Code prompt that wires it up.

David 7 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog