Page 2 of 2
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Thu Apr 03, 2014 1:50 pm
by GodSpeed JP1
Anyone can help me ? My window.plugins.pushNotification does not work on real device.I can recive push.But I want to use window.plugins.pushNotificaiton in js to get the devcieToken and clean the badge .But It says windows.plugins.pushNotification is undefinded.
On real devcie ti show a white screen, means something wrong.
I am using Lib V2.0, and I checked the config of pushNotification in config.xml and checked the plugin file.I need anything special config?
I have been working in this for two days ,thanks for any reply.
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Thu Apr 03, 2014 5:16 pm
by Maryna Brodina
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Thu Apr 03, 2014 5:47 pm
by GodSpeed JP1
Thank you Maryna,
I have shared my project to you.
My app's name is GF.
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Thu Apr 03, 2014 7:51 pm
by Maryna Brodina
1) You don't need to invoke any .h,.m files into project, pushNotification plugin is added by default
2) You need to call plugin this way prePushNotification.setApplicationIconBadgeNumber(0, function(){});/pre3) There is a bug unfortunately - it doesn't work in 2.0 version, but works in 1.2
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Fri Apr 04, 2014 1:21 am
by GodSpeed JP1
Thank you Maryna,when can you fix this bug?
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Fri Apr 04, 2014 1:27 am
by Alena Prykhodko
Hello,
Planning to fix on Production with the next (mid-April) release.
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Fri Apr 04, 2014 1:35 am
by GodSpeed JP1
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Sun Apr 13, 2014 5:38 pm
by GodSpeed JP1
Hi,I can use PushNotification.setApplicationIconBadgeNumber command to clear the badge after update.
Thank you very much.
But I still can't get deviceToken,
How can I get deviceToken use PushNotification Class?
I tried the code below,but it not work.
Code: Select all
var pushNotification = new PushNotification();
pushNotification.onDeviceReady();
pushNotification.registerDevice({
alert: true,
badge: true,
sound: true
},
function (status) {
alert(status);
var deviceToken = status['deviceToken'];
alert('registerDevice: ' + deviceToken);
},
function (status) {
alert('failed to register : ' + JSON.stringify(status));
navigator.notification.alert(JSON.stringify(['failed to register ', status]));
});
Could you give me a right way to get deviceToken by JS?
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Mon Apr 14, 2014 7:54 pm
by Maryna Brodina
pushNotification.setApplicationIconBadgeNumber can't clean the badge.
Posted: Tue Apr 15, 2014 11:19 am
by GodSpeed JP1
Thank you Maryna, I got it.