Closed remluben closed 3 years ago
Did you run npx cap sync after npm install?
Did you run npx cap sync after npm install?
Hello, thank you for your feedback. Yes i did run the sync. Other plugins @ionic-native/contacts
work perfectly okay on the device.
Note, that the native Capacitor PushNotifications also work correctly. Unfortunately I did not find an option to register for a specific topic with PushNotifications, that's why I gave the community plugin a try.
Kind regards, Benjamin
@remluben
I think the problem is that you forgot to add this plugin to your MainActivity.java.
Since the other plugin you are referring to is a cordova-plugin this step isn't necessary there.
I looked throught the readme of this plugin and i did not find this step there so this could/should be probably stated there...
As you can see in the example-integration it get's added to the MainActivity
You can read more about this in the capacitor-docs.
br
@remluben
I think the problem is that you forgot to add this plugin to your MainActivity.java.
Since the other plugin you are referring to is a cordova-plugin this step isn't necessary there.
I looked throught the readme of this plugin and i did not find this step there so this could/should be probably stated there...
As you can see in the example-integration it get's added to the MainActivity
You can read more about this in the capacitor-docs.
br
Hi @adrenaline15 ,
that's the missing link. I did not know about these extra steps to take.
Anyway, my issues are solved.
Thanks a lot.
Kind regards, Benjamin
FCM, FCMPlugin are always undefined Our Ionic setup with Capacitor using capacitor-community/fcm to listen for push notifications for defined topics (currently only all) does not work as expected. Calling
fcm.subscribeTo()
as well asFCMPlugin.subscribeTo()
result in an error when running in an Android device:My first thoughts were, that this is an Angular / Ionic specific issue, but after trying a couple of different solutions, I concluded, that there is another problem in our setup:
const fcm = new FCM()
did not workFCMPlugin.subscribeTo()
directly did not workthis.application.ready().then()
callback did not work tooTo Reproduce
Package and software versions
Notes
Code sample