I know you probably have many topics about notification but I need your help. Maybe I’m just stupid or I have problem with understanding english… I tried phonegap-plugin-push
with FirebaseCM and notifications doesn’t show. So I have few questions.
I installed plugin, then I add to my app.js this code:
if (typeof(PushNotification) !== "undefined"){
var push = PushNotification.init({
android: {
senderID: "123123123123" // My Project ID?
},
browser: {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
},
ios: {
alert: "true",
badge: "true",
sound: "true"
},
windows: {}
});
push.on('registration', function(data) {
// data.registrationId
alert("Registered");
});
push.on('notification', function(data) {
// data.message,
// data.title,
// data.count,
// data.sound,
// data.image,
// data.additionalData
alert("Should be notification here?");
});
push.on('error', function(e) {
// e.message
});
}
And that’s it? Then I go to https://cordova-plugin-fcm.appspot.com/ and put my Api Key (not project ID) and then send my notification. Is that correct on should I do something more?
And BTW notifications works only on real device or in emulate mode too?