@Niranjan100395 wrote:
I have used the following plugin to run the app in the background.
Background plugin from katzerI have to run a timer in the notification bar continuously when the app goes in the background (just to show how long the app is in the background).
cordova.plugins.backgroundMode.setDefaults({
title : 'Timer running',
text : 'some text'
});cordova.plugins.backgroundMode.onactivate = function () {
setInterval(function () {
a=a+1;
cordova.plugins.backgroundMode.configure({
text: a
});
}, 1000);
}I have initialized a to 0 when the app is launched. The code is working and the text part of the notification is getting updated.
But each time it is updated a new notification is created. Is there a possible way to update just the text part of the notification without creating a new notification each time?Thanks in advance
Posts: 1
Participants: 1