OneSignal / OneSignal-Cordova-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Other
250 stars 198 forks source link

Feature: Handling Action Buttons without Opening the App #777

Open bbohach opened 2 years ago

bbohach commented 2 years ago

Description: Looking for something to handle the following section in the OneSignal docs. Prevent the app from opening when clicking on an action button https://documentation.onesignal.com/docs/action-buttons#handing-action-buttons-without-opening-the-app

Environment

  1. onesignal-cordova-plugin: ^3.0.2
  2. @capacitor/core: 3.4.1
bbohach commented 2 years ago

I was able to follow this to get it working on iOS (haven't tried Android), combined with setNotificationOpenedHandler to handle the event. But it would be nice to have a function on this plugin to make it easier to work with, so it works for both Android & iOS via this plugin