nativescript-community / push

Apache License 2.0
9 stars 3 forks source link

Question: Compatibility with nativescript/firebase? #3

Open lambourn opened 2 years ago

lambourn commented 2 years ago

@farfromrefug do you happen to know if your push plugin is compatible with the rewritten https://github.com/NativeScript/firebase plugin - which is missing the non-firebase messaging that was originally part of Eddie's version, see https://github.com/NativeScript/firebase/issues/7

I suspect the firebase versions do not match but I haven't tried it yet.

The question might sound silly, but we have a use case were we use Firebase Analytics and Firebase Crashlytics but non-Firebase Push Messaging.

farfromrefug commented 2 years ago

@lambourn this plugin does not use firebase at all! It only uses platform push notifications system. So it does not have to code the register your devices through firebase.

lambourn commented 2 years ago

@farfromrefug ok - so it just needs the Firebase Messaging dependency on Android (include.gradle and PushMessagingService) to access the native messaging tier which always uses FCM on Android, right?

farfromrefug commented 2 years ago

@lambourn The thing is more that this plugin does not handle the registration of the device to your firebase instance. So your firebase instance does not know which device to send the notification to. In a sense this plugin only handle the "receive" part of the notification system. Consequently this plugin needs a counterpart for the association of a device to a Firebase/Apple device instance. In my case we never use firebase so we do it in PHP or JS: we store the device id in our db so that the server knows which device to send a notif to(through Apple/Google(firebase always)) which will be received by this plugin

lambourn commented 2 years ago

Hi @farfromrefug - ok, makes sense. We use the same approach already: we combine the token with a registration ID on the server side. Previously we used Eddie's nativescript-firebase-plugin which allows to use both: Firebase Crashlytics & Analytics & "Firebase-less" Push Notifications.

Now as we moved to the rewritten nativescript/firebase plugin, we need a replacement for the "Firebase-less" Push Notifications and will give your plugin a try.

Will ping back here, maybe raise a PR to synchronize the Firebase Messaging version in the include.gradle /and remove that pesky jcenter() repo entry)

pjabang1 commented 2 years ago

Hi, does this plug-in work with nativescript 8

farfromrefug commented 1 year ago

@pjabang1 yes it does