Skip to content

[Feature Request / Question]: Support "Dismiss" button without opening app in React Native / Expo #1890

Description

@Aarjav638

How can we help?

Hi OneSignal team,

I am using the OneSignal SDK in a React Native Expo development build. I have a notification with two action buttons:

  1. "View Lead" — should open the app and navigate to a specific screen (working fine)
  2. "Later" — should remove the notification without opening the app

Currently, the SDK/API does not seem to support this use-case:

  • Adding "url": "onesignal://dismiss" in the buttons array in the REST API payload is not working as per button action url allocation is not allowed.
  • Using the dashboard template, all action buttons inherit the launch_url and always open the app.
  • JS methods like OneSignal.Notifications.removeNotification(id) require the app to be running, so they cannot handle a dismiss while the app is closed.
  • Adding a native Notification Service Extension in Expo dev build cannot override the default launch behavior if a launch URL is set.

Essentially, there does not appear to be a way to have a dismiss action button that removes the notification without opening the app on Android (iOS behavior is secondary for now).

My questions:

  1. Is there a supported way to achieve this in OneSignal for React Native / Expo?
  2. If not, is this planned for a future SDK update?
  3. Are there recommended workarounds for dismiss-only action buttons?

Any guidance or example would be greatly appreciated.

Thank you!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. jinliu9508 commented on Jan 20, 2026

    @jinliu9508

    Thanks for the detailed report. On Android, OneSignal notification action buttons always launch the app because they are handled via a PendingIntent. As a result, a true dismiss-only action button (that removes the notification without opening the app) is not currently supported in React Native / Expo.

    Specifically:

    • Action buttons always open the app on Android
    • JS APIs like removeNotification require the app to be running
    • Dashboard templates apply the same launch behavior to all buttons

    What is supported:

    • Use button IDs to handle navigation when the app opens
    • Pass routing data via the notification payload instead of launch_url

    Workarounds:

    • Rely on swipe-to-dismiss for “Later” behavior
    • Use a Bare React Native setup or custom native Android code to implement a dismiss-only button

    This is a known limitation and a common feature request. While we don’t have an ETA, it’s something we’re tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions