Page 2 of 4

Reset Push Badge

Posted: Sun May 11, 2014 10:54 am
by Maryna Brodina

Hello!

Please check this post https://getsatisfaction.com/apperyio/...


Reset Push Badge

Posted: Wed Jul 09, 2014 2:13 pm
by Marco Spera

Hi,

I am having the same problem.

Can I just run the javascript below on device ready event to reset push badge:

function successHandler() {
// do something
}
pushNotification.setApplicationIconBadgeNumber(successHandler, 0);

Am I missing anything?


Reset Push Badge

Posted: Wed Jul 09, 2014 5:32 pm
by Evgene Karachevtsev

Hello Marco,

Could you please try this code on device ready event

codePushNotification.setApplicationIconbadgenumber(0, function(){});/code


Reset Push Badge

Posted: Thu Jul 10, 2014 2:53 pm
by Marco Spera

Thanks Evgene, I will give it a try.


Reset Push Badge

Posted: Thu Jul 10, 2014 9:14 pm
by Marco Spera

Hi Evgene,

I tried the code you suggested, but it still does not reset the push notification badge.

I am out of ideas of what to do to fix it....


Reset Push Badge

Posted: Fri Jul 11, 2014 8:52 am
by Maryna Brodina

Hello!

Please try this one:prevar pushNotification = window.plugins.pushNotification;
pushNotification.setApplicationIconBadgeNumber(function successHandler() {
// do something
} , 0);/pre


Reset Push Badge

Posted: Sat Jul 12, 2014 6:29 pm
by Marco Spera

Hi Maryna,

I tried running the javascript just as you told me above, with the event device read on the my login page, but still no luck. The badge icon does not reset.

Any other ideas?


Reset Push Badge

Posted: Sat Jul 12, 2014 7:28 pm
by Marco Spera

Question that maybe can help solve this issue....

I followed the tutorial to setup push notifications here:
http://devcenter.appery.io/tutorials/...

Is the section "Notifications from the app" required, or is this only if you want the user to be able to manually adjust the notifications?

I did not complete this section, but I did do everything else.


Reset Push Badge

Posted: Sun Jul 13, 2014 3:12 pm
by Marco Spera

Any other ideas why my badge app will not reset?


Reset Push Badge

Posted: Mon Jul 14, 2014 10:52 pm
by Marco Spera

Was able to solve this issue with Evgene's suggestion of:

PushNotification.setApplicationIconbadgenumber(0, function(){});

I was using it on the wrong page originally, but now works perfectly!