nativescript-local-notifications
nativescript-local-notifications copied to clipboard
set progress on ongoing notification "Android"
how to set progress of ongoing notification on android?
Can you elaborate?
LocalNotifications.schedule([{
id: 1,
title: 'The title',
body: 'Recurs every minute until cancelled',
ticker: 'The ticker',
ongoing: true, // makes the notification ongoing (Android only)
at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now
}]).then(
function() {
console.log("Notification scheduled");
},
function(error) {
console.log("scheduling error: " + error);
}
)
above code creates on going notification on android. it will show a progress bar in notification. how to set progress value for that notification.
I wasn't aware you could set the progress value - can you do me a favor and point me at the SDK call that's needed? Or some SO answer perhaps.
i will clone the repo and make necessary changes to it.
@bhavincb did you manage to find a solution?
Didn't have time to completely implement it in local-notification so created small plugin. here you can use it: https://www.npmjs.com/package/nativescript-progress-notifications