Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Reset Push Badge

Hello!

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

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Reset Push Badge

Hello Marco,

Could you please try this code on device ready event

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

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

Thanks Evgene, I will give it a try.

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

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....

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Reset Push Badge

Hello!

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

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

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?

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

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.

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

Any other ideas why my badge app will not reset?

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Reset Push Badge

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!

Return to “Issues”