CCExtractor / CCExtractor/ultimate_alarm_clock

Feature: Stopwatch Persistent Notification

Đang mở
#755 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
112
Fork
227
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Description

### Problem
Currently, when the stopwatch is running and the user navigates back to the home screen or switches apps, there’s no visible indication that the stopwatch is still active. Users have to reopen the app to check the elapsed time, which is inconvenient.

### Proposed Solution
Implement a **persistent notification** that:
- Displays the current running stopwatch time (updates every second).
- Remains visible as long as the stopwatch is running.
- Includes actionable buttons:
- **Pause**
- **Reset**
- **Open App**

The notification should automatically dismiss itself when the stopwatch is stopped or reset.

### Suggested Implementation
- Use [`flutter_local_notifications`](https://pub.dev/packages/flutter_local_notifications) for displaying notifications.
- Use [`android_alarm_manager_plus`](https://pub.dev/packages/android_alarm_manager_plus) or a foreground service to update the notification every second while the app is in the background.
- Connect the notification updates to the `StopwatchController` (or equivalent stopwatch logic) so that the displayed time is always accurate.
- Handle actions (Pause/Reset) via intent callbacks or notification action handlers.

### Benefits
- Users can easily track elapsed time without opening the app.
- Makes the stopwatch feature more robust and professional.
- Enhances user experience, especially for tasks that require continuous time tracking in the background.

### Video
https://github.com/user-attachments/assets/a5a69fe3-5eb8-43ed-87ea-efd454036226

---

> I’d be happy to contribute if guidance or PR support is needed!

### Screenshots

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.