Firebase Cloud Messaging with Ionic app

后端 未结 5 1591
时光说笑
时光说笑 2020-12-07 12:14

I am developing android/ios app using ionic framework (web technologies) and I want to add Push Notification with the help of new firebase feature FCM.

Right now I a

5条回答
  •  青春惊慌失措
    2020-12-07 12:46

    You can use FCM with cordova without a problem but it requires writing native code for Android, iOS and other platforms you want to use. Luckily the cordova community is pretty big and the work is already done. The following plugin states to do exactly what you want.

    https://www.npmjs.com/package/cordova-plugin-fcm

    I haven't tried the plugin myself yet but the readme says you can subscribe to topics from javascript and call the onNotification function to listen for notifications, handy when your app is in foreground.

提交回复
热议问题