Skip to content

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

@Aarjav638

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions