Open Zerokk opened 4 years ago
Exactly the same issue. Did you find a solution?
The same issue here any one can help ?
For us it did not work in Phonegap emulator, but works in the real app.
For us it did not work in Phonegap emulator, but works in the real app.
I am trying in real device and i can get token but "onNotification" event never triggered, i am listening in app component's constructor when platform is ready , here is my code
this.platform.ready().then(() => { this.fcm.onNotification().subscribe(notificationData => { alert(notificationData); }); });
do you have any idea about what is wrong here?
@Ahmed-Abdelfattah-MF Did you find a solution since?
any solution for this issue?
I managed to install the plugin (the fork with all dependencies included), and it can receive notifications that I send from the Firebase console, or this one: https://cordova-plugin-fcm.appspot.com/
These notifications actually show up in my phone, so that's something. But when I try fetching a token, both with .getToken() or .onTokenRefresh(), nothing gets returned:
this.fcm.onTokenRefresh().subscribe(token => { console.log("token received: ", token) user.set("FCMToken", token) user.save() .then(() => console.log("[PushHandler] Token saved in Parse's User")) .catch(err => console.log("[PushHandler] Error saving FCM token")); });
Also, when I click on a notification, the app opens up, but nothing shows up. This is my handler:
What's wrong here?