How to read firebase push notification content and fire a method i?


#1

Is it possible to access push notification content in ionic 2 and execute bunch of code when notification arrive or system event fire?


#2

You can use onNotification() function of FCM in Ionic 2. For more info, check this doc:


#3

thanks but the problem is when I installing FCM and run the app fallowing error appear:

Module ‘“E:/apps/Myapp/node_modules/ionic-native/dist/es5/index”’ has no exported member ‘FCM’.

Ionic Framework: 2.1.0
Ionic Native: 2.4.1
Ionic App Scripts: 1.1.3
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 7.4.0


#4

Update to the latest ionic-native release. We fixed that issue in 3.7.0