Questions
OneSignal Action Buttons — Handle Taken/Snooze in Background Without Opening App
Hi Median team,
We have a Median iOS/Android app using the Median OneSignal plugin. Push notifications are working correctly.
We have also successfully tested OneSignal iOS/Android Action Buttons on a physical iPhone. The notification correctly displays two buttons:
- Action ID: taken — label: Taken
- Action ID: snooze — label: Snooze
Currently, tapping either action button opens the Median app/WebView.
We want these two actions to execute in the background without opening/foregrounding the app:
Taken: tap → background handler → POST to our backend → mark reminder occurrence as taken → app remains closed.
Snooze: tap → background handler → POST to our backend → schedule snoozed reminder → app remains closed.
A normal tap on the notification body should continue opening the app normally.
According to OneSignal’s Action Buttons documentation, iOS background actions can use an ios_category / UNNotificationCategory with actions that do not use the foreground option. Android can override the default open behavior and handle the action through OneSignal’s native notification/service-extension mechanism.
Our question is specifically about Median’s managed native build:
- Does Median’s OneSignal plugin provide a configuration or JavaScript Bridge API that lets us receive taken / snooze action IDs and process them without foregrounding/opening the WebView?
- Can we register a custom UNNotificationCategory and background UNNotificationActions on iOS through Median App Studio or Median’s managed build?
- Can we add the equivalent OneSignal background action handler/service extension on Android through the managed build?
- If custom native Swift/Kotlin code is required, can Median add this small customization while we continue using Median’s managed Build & Deploy system?
- If yes, what is the process for providing the Swift/Kotlin files to Median?
- If not, is exporting the Median iOS/Android source code and maintaining these modifications ourselves the only supported option?
We already have the backend endpoint and native Swift/Kotlin implementation prepared. We do not want to replace Median’s OneSignal plugin or introduce another push provider.
Bundle ID / Package Name: com.rytvi.app
The key requirement is simply:
Action button → background processing → no app/WebView opening.
Thank you.