ActivityWatch / ActivityWatch/aw-android

aw-notify support: activity-based notifications on Android

未关闭
#196 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Kotlin
星标
265
派生
57
平均合并
2 天 21 小时
30 天内合并 PR
19

描述

## Problem

Add `aw-notify` support to aw-android so users can opt into activity-based notifications such as per-app time alerts or category-budget nudges. The Android product behavior is not specified yet; this issue should define that behavior before implementation rather than assume a direct port of the desktop daemon.

PR #195 provides the Android 13+ `POST_NOTIFICATIONS` permission needed for any user-visible notification.

## Discovery scope

Before choosing an implementation, answer:

- Which first notification use case delivers enough value to ship?
- Is the rule engine shared with [`aw-notify`](https://github.com/ActivityWatch/aw-notify), ported, or Android-specific?
- Where are rules configured, and how can users disable or snooze them?
- What cadence and execution mechanism preserve battery life and Android background limits?
- Should evaluation query the local aw-server-rust API, consume watcher events directly, or use another boundary?
- How do quiet hours, duplicate suppression, timezone changes, and Do Not Disturb behave?

## Candidate MVP (not yet committed)

A WorkManager periodic task could evaluate one locally configured threshold against the on-device aw-server-rust data, post via `NotificationCompat`, and persist enough state to avoid duplicate alerts. Android periodic work has a 15-minute minimum interval, so this is appropriate for coarse summaries or budgets, not exact real-time limits.

## Acceptance criteria

- [ ] A concrete MVP use case and rule semantics are documented
- [ ] Notification opt-in/configuration UX is specified
- [ ] Scheduling, battery, and Android background-execution trade-offs are documented
- [ ] Duplicate suppression, quiet hours, timezone changes, and unavailable local server are covered
- [ ] The implementation boundary relative to desktop `aw-notify` is decided
- [ ] A scoped implementation issue or PR is created from the design

## Out of scope

- Implementing all desktop `aw-notify` features in the first Android slice
- Server-driven or cross-device notifications before sync is ready
- Treating the always-on foreground-service status notification as an `aw-notify` feature

## Related

- #195 — `POST_NOTIFICATIONS` manifest permission and runtime request
- #189 — v0.14.0 tracking issue
- Desktop project: https://github.com/ActivityWatch/aw-notify

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。