3

I'm using ionic 5 and cordova with the local-notification-plugin to create reminders for an ios and android app.

When the user clicks on the local notification, the click event handler will check the clicked notification and navigate the user to a specific page.

// app.cmp
this.localNotifications.on('click').subscribe((res) => {...});

This works fine only if the app is in active or in the background. If the app is closed, the subscription returns nothing after the app is launched.

Is there a reliable way I can detect that the app has been opened by a local notification? I need this to work for android and ios using the ionic and cordova.

Furthermore, the plugin states that there is a launchDetails property, which seems not to be working.

Han Che
  • 8,239
  • 19
  • 70
  • 116
  • Seems like there's an open issue for this already: https://github.com/katzer/cordova-plugin-local-notifications/issues/1836 – sebaferreras Sep 07 '20 at 17:10

0 Answers0