capacitor-community / fcm

Enable Firebase Cloud Messaging for Capacitor apps
https://capacitor.ionicframework.com/docs/
MIT License
237 stars 83 forks source link

fix: migrate getToken to use FirebaseMessaging, #99 #111

Closed marcjulian closed 1 year ago

marcjulian commented 2 years ago

This PR updates getToken for Android to use FirebaseMessaging instead of FirebaseInstallations, suggested by @sburnicki https://github.com/capacitor-community/fcm/issues/99#issuecomment-1086724322. I tested it and getToken now returns FCM Token in the same format as with the workaround proposed by @eljass https://github.com/capacitor-community/fcm/issues/99#issuecomment-942273362.

Please test this PR if it works for you too and let me know, if there is anything else todo to get this merged.

sneko commented 2 years ago

Hi,

@stewones could you have a look at this PR please? As mentioned in #99 the plugin is no longer working for Android which is a big breaking change when upgrading to the latest version.

Thank you,

hembachrterran commented 2 years ago

I tested this modification in our application, the function seems working properly. The registration token returned, except the JWT identifier. Please accept this PR and release a new version. Also there is similar problem with Capacitor Push Notification plugin @capacitor