-
Notifications
You must be signed in to change notification settings - Fork 661
Description
Feature Request
Plugin
- @capacitor/local-notifications
Description
Sometimes it is important for time related tasks to show a timer inside the notification. Android supports such functionality by calling the setUsesChronometer function on the Notification.Builder class. Setting this parameter to true will add a small timer with the format "HH:mm" that is counting the duration the notification is active.
The Cordova Plugin / Local Notification supports this as androidUsesChronometer and androidShowWhen properties. Adding this feature would make migration to the capacitor plugin even more straight forward.
Platform(s)
- Android
Preferred Solution
Add a parameter called usesChronometer to the LocalNotificationSchema of the @capacitor/local-notifications Plugin. Here is an example, of how this configuration might look like:
LocalNotifications.schedule({
notifications: [
{
id: 283912,
title: 'Test Notification',
usesChronometer: true
}
]
});Alternatives
No alternatives that come in mind.
Additional Context
I need this feature for one of my apps. It is important for the user to see how long the notification is already active.