You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
today the objetive is create a notification from 'nodejs' and receive in my phone 'android' in notificacition metod. this should create notification in state bar.
Actual Behaviour
not create notification in state bar.
this is my response in notification metod
{"count":"3","title":"Push Notification Sample","message":"u270C Peace, Love u2764 and PhoneGap u2706!","additionalData":{"from":"39337343579","collapse_key":"do_not_collapse","foreground":true}}
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
android 5.1.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
samsung galaxy note 2
Cordova CLI version and cordova platform version
cordova 6.1.0
Sample Push Data Payload
var registrationIds = [];
var sender = new gcm.Sender('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
var message = new gcm.Message();
message.addData('message',"u270C Peace, Love u2764 and PhoneGap u2706!");
message.addData('title','Push Notification Sample' );
message.addData('msgcnt','3');
message.timeToLive = 3000;
registrationIds.push('APA91bFIVdHIMOgr3d3FtzS79bc9lHa-SgJpE1roEIhAg8hsi4X1ErBMnPTTIBlhnfBwDn0zf2awJqbRMeMyXQ1yUjylITB4ueeNTkskFgjFfDvGB3sLAd_u6QoHeP2u7Cj12ycuwRmN');
sender.send(message, registrationIds, 4, function (err,response) {
if(err) {
console.log("error " + err);
} else {
console.log(response);
}
});
Expected Behaviour
today the objetive is create a notification from 'nodejs' and receive in my phone 'android' in notificacition metod. this should create notification in state bar.
Actual Behaviour
not create notification in state bar.
this is my response in notification metod
{"count":"3","title":"Push Notification Sample","message":"u270C Peace, Love u2764 and PhoneGap u2706!","additionalData":{"from":"39337343579","collapse_key":"do_not_collapse","foreground":true}}
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
android 5.1.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
samsung galaxy note 2
Cordova CLI version and cordova platform version
cordova 6.1.0
Sample Push Data Payload
var registrationIds = [];
var sender = new gcm.Sender('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
var message = new gcm.Message();
message.addData('message',"u270C Peace, Love u2764 and PhoneGap u2706!");
message.addData('title','Push Notification Sample' );
message.addData('msgcnt','3');
message.timeToLive = 3000;
registrationIds.push('APA91bFIVdHIMOgr3d3FtzS79bc9lHa-SgJpE1roEIhAg8hsi4X1ErBMnPTTIBlhnfBwDn0zf2awJqbRMeMyXQ1yUjylITB4ueeNTkskFgjFfDvGB3sLAd_u6QoHeP2u7Cj12ycuwRmN');
sender.send(message, registrationIds, 4, function (err,response) {
if(err) {
console.log("error " + err);
} else {
console.log(response);
}
});
####### code de app
var push = PushNotification.init({
"android": {
"senderID": "xxxxxxx"
},
"ios": {"alert": "true", "badge": "true", "sound": "true"},
"windows": {}
});
The text was updated successfully, but these errors were encountered: