Hi,
I have created an app using the Mapviewer template. I extended the template with some push notification functionality. When the app is used, the user get's a push notification when getting close to a feature.
If the app is running in the background, then a push notification also appears, but this leads to this problem:
The notification is shown on the app icon:
The notification (the number) cannot be removed again from the app icon. I have to shut the app down, before the notification disappears.
The code for the push notification is:
function pushNotificationMessage(title, message, vibrate) { if (message && notification.supported) { notification.clearAll();
notification.schedule(title, message, 1001);
}
if (vibrate && Vibration.supported) { Vibration.vibrate();
}
}
What can i do, to make the notification disappear when the app is opened?
Best Regards