EddyVerbruggen / nativescript-local-notifications

:mailbox: NativeScript plugin to easily schedule local notifications
MIT License
162 stars 57 forks source link

Possible problems when using both this and Firebase plugin on android #183

Open PeterStaev opened 4 years ago

PeterStaev commented 4 years ago

It seems there is is a problem when using both LocalNotifications and Firebase plugins in the same app under android. And more specifically if you kill the app and then respond via an action, the local notification handler is not triggered. In all other cases - when the app is in either foreground or background seems the callback is correctly triggered. It is probably something similar to #107

edusperoni commented 4 years ago

I wrote https://github.com/edusperoni/nativescript-shared-notification-delegate for this exact reason. My PRs with the fixes are on both repos and allow any library to share a single delegate (interception is also possible):

https://github.com/EddyVerbruggen/nativescript-plugin-firebase/pull/1272 https://github.com/EddyVerbruggen/nativescript-local-notifications/pull/155

@saeb-panahifar helped test and validate the fixes, just waiting on @EddyVerbruggen to merge them.

PeterStaev commented 4 years ago

@edusperoni your PRs are for iOS, this is for android 😉

edusperoni commented 4 years ago

I see. You should probably add that to the issue description, as #107 is describing the iOS scenario.

EddyVerbruggen commented 4 years ago

FYI the related iOS issue in this repo (and the Firebase one) is in my list of open tabs in Chrome. Trying to find some time every day to get this processed. I think I'll just merge them because they've already been tested. @edusperoni many thanks for your efforts!