-
Notifications
You must be signed in to change notification settings - Fork 494
Description
Describe the problem
The notification plugin currently does not expose Android chronometer capabilities, which makes stopwatch/timer UX difficult for mobile apps.
I'm building a time-tracking apps, and I need notifications that can display elapsed (or countdown) time directly in the system notification. Android already supports this through NotificationCompat.Builder chronometer APIs, but tauri-plugin-notification does not currently expose equivalent fields in the JS/Rust API.
Describe the solution you'd like
Add optional Android-focused fields to the notification payload and wire them through all plugin layers (JS guest API, Rust model/builder, Android model/builder):
when(epoch ms)usesChronometer(boolean)chronometerCountDown(boolean, Android 24+ behavior)
Expected behavior:
- On Android, these map to notification builder chronometer APIs so apps can show elapsed/countdown timer notifications.
- On non-Android platforms, these fields are ignored gracefully.
This would keep backwards compatibility while enabling a common mobile use case.
Alternatives considered
- Keep current plugin and implement timer text updates manually by repeatedly sending updated notifications.
- Works, but less efficient and less native than Android chronometer behavior.
- Use platform-specific custom Android code in each app.
- Works, but defeats plugin portability and increases maintenance burden.
Additional context
I already implemented and validated a local prototype in a fork/local checkout by extending:
- JS options surface
- Rust
NotificationDataand builder - Android
Notificationmodel andTauriNotificationManager
I plan to open a PR if maintainers agree with this feature direction.