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
Hi,
The following code i write to ios badge icon number set logic. while my app is active status meands badge icon number is set. When remove active status means not set badge icon number.
function onNotificationAPN (event) {
localStorage.setItem("push_id",event["url-args"]);
if ( event.alert ) {
//navigator.notification.alert(event.alert);
}
if ( event.sound )
{
var snd = new Media(event.sound);
snd.play();
}
if ( event.badge )
{
// alert('badge')
var badgeNumber = Number(localStorage.getItem("badge")) + 1;
localStorage.setItem("badge",badgeNumber)
if(event.foreground == false) {
window.plugins.pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, badgeNumber);
} else {
window.plugins.pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, badgeNumber);
}
}
}
The text was updated successfully, but these errors were encountered:
Hi,
The following code i write to ios badge icon number set logic. while my app is active status meands badge icon number is set. When remove active status means not set badge icon number.
function onNotificationAPN (event) {
localStorage.setItem("push_id",event["url-args"]);
}
The text was updated successfully, but these errors were encountered: