Skip to content

feat(notify): let Android users review urgent channel settings - #572

Merged
PiscesXD merged 4 commits into
ExpTechTW:mainfrom
Vinson1014:feat/android-urgent-notifications
Sep 19, 2026
Merged

PiscesXD merged 4 commits into
ExpTechTW:mainfrom
Vinson1014:feat/android-urgent-notifications

Conversation

@Vinson1014

Copy link
Copy Markdown
Contributor

Platform: android

New(zh-Hant): Android 可逐一檢查重大通知是否能在勿擾模式中發出
New(en-US): Android users can review major-alert channels in Do Not Disturb

這個 PR 做了什麼

在 Android 的 onboarding 與權限檢查中,顯示重大通知頻道的實際勿擾模式狀態,並提供各頻道的系統設定入口。

Android 沒有與 iOS Critical Alerts 完全對等的公開能力。本 PR 協助使用者設定重大通知頻道是否可通過勿擾模式,但通知無法穿透靜音模式、震動模式、零通知音量、頻道靜音或 OEM 額外限制。

Screenshot_20260910-185603 (自訂)

相關 issue

怎麼驗

  1. 在 Android 開啟 onboarding 權限步驟或「更多 → 權限檢查」。
  2. 確認普通通知權限下方顯示「勿擾模式下的重大通知」區塊。
  3. 展開區塊,確認只列出系統中實際存在的重大通知頻道。
  4. 確認各頻道會依 canBypassDnd() 顯示目前是否允許在勿擾模式期間通知。
  5. 點擊任一頻道的「開啟設定」,確認會進入該頻道的 Android 系統設定頁。
  6. 修改設定後返回 DPIP,確認畫面會重新讀取並更新頻道狀態。
  7. 確認略過這些設定不會阻止 onboarding 完成。
  8. 確認 iOS Critical Alerts 流程未被改動。

自動驗證:

  • tool/check.sh 通過。
  • flutter analyze 無問題。
  • 1,820 項測試通過,5 項 development preview 測試依設定跳過。
  • l10n、layering、codegen、notification sounds 與 commit gates 均通過。

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyzemise exec -- flutter test 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion
    深色模式看過,文字對比度可接受

@whes1015
whes1015 requested a review from PiscesXD September 14, 2026 03:10
@lowrt lowrt added this to the v26.3 milestone Sep 15, 2026
@PiscesXD
PiscesXD force-pushed the feat/android-urgent-notifications branch from 4a7fb3d to b6316bc Compare September 17, 2026 15:40
@PiscesXD

PiscesXD commented Sep 17, 2026

Copy link
Copy Markdown
Member

我 rebase main 和 調整了 UI 排版最佳化,視覺上更直觀一點.

Discord 訊息

@whes1015
whes1015 force-pushed the feat/android-urgent-notifications branch from b6316bc to bf3876a Compare September 17, 2026 16:54
PiscesXD
PiscesXD previously approved these changes Sep 19, 2026
Vinson1014 and others added 4 commits September 19, 2026 12:50
Platform: android

New(zh-Hant): Android 可逐一檢查重大通知是否能在勿擾模式中發出
New(en-US): Android users can review major-alert channels in Do Not Disturb
Platform: android

New(zh-Hant): 有重大通知不能在勿擾模式發出時,權限檢查會在該區標上紅點
New(en-US): a dot marks the major-alert section when a channel is still held by Do Not Disturb
@PiscesXD
PiscesXD force-pushed the feat/android-urgent-notifications branch from bf3876a to d0ba688 Compare September 19, 2026 04:52
@codecov

codecov Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.43165% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.77%. Comparing base (b5ae3f9) to head (d0ba688).

Files with missing lines Patch % Lines
lib/shared/widgets/permission_checklist.dart 49.48% 49 Missing ⚠️
...re/notifications/urgent_notification_settings.dart 85.71% 6 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@YinCheng0106 YinCheng0106 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

功能部分已使用 Android Emulator 實際測試,權限檢查、重大通知頻道狀態、開啟系統 Channel Settings,以及返回 App 後的狀態更新皆可正常運作

因為我沒有實體 Android 裝置,所以這次沒有驗證不同 OEM 裝置,以及實際 DND/靜音模式下的通知行為
這部分仍須以 Android 系統與各裝置實際行為為準

LGTM 👍

@PiscesXD
PiscesXD merged commit 802078d into ExpTechTW:main Sep 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants