- 删除 VerificationCodeParser 及相关测试,短信捕获和推送不再解析验证码 - 飞书推送改为只发送短信原文,时间戳格式化为可读日期 - 移除主界面"只推送验证码"开关和"调试时上传完整短信正文"选项 - 移除"保存轮询间隔"按钮,开启轮询时自动保存间隔(未输入默认1秒) - 按钮文字从"开始1秒轮询验证码"改为"开始短信轮询" - 删除"打印最近30条短信"功能及相关 SmsInboxReader.logRecentMessages - SmsInboxReader 用 RecentSmsResult 替换 RecentCodeResult - FeishuWebhookConfigStore.Config 移除 filterVerificationCode/sendFullBodyDebug - 修复代码缩进不一致问题
3.0 KiB
3.0 KiB
ADDED Requirements
Requirement: Receive new SMS messages through the system broadcast path
The app SHALL use Android's new SMS received broadcast path as the primary mechanism for capturing verification SMS messages on the user's own device.
Scenario: SMS broadcast is received with permission granted
- WHEN the app has
RECEIVE_SMSpermission and the device receives a text SMS - THEN the app MUST process
Telephony.Sms.Intents.SMS_RECEIVED_ACTIONand extract message objects from the received intent
Scenario: SMS broadcast is unavailable because permission is missing
- WHEN the app does not have
RECEIVE_SMSpermission - THEN the app MUST report that the primary SMS capture path is blocked by missing permission
Requirement: Preserve complete SMS message bodies
The app SHALL preserve SMS bodies using Android SMS message APIs rather than ad hoc PDU handling in business logic.
Scenario: Multi-part SMS is received
- WHEN the received intent contains multiple SMS message segments
- THEN the app MUST combine the message bodies in received order before saving or displaying the capture result
Scenario: Sender and timestamp are available
- WHEN Android exposes sender address or timestamp for the SMS message
- THEN the app MUST attach those values to the capture result for diagnostics and display
Requirement: Surface the original SMS content as the primary result
The app SHALL use the original SMS body as the primary display and diagnostic result.
Scenario: SMS body is available
- WHEN the app reads an SMS body successfully
- THEN the app MUST retain the original SMS body for local display and diagnostics
Scenario: SMS body is empty
- WHEN the app reads an SMS message but the body is empty
- THEN the app MUST return a structured failure instead of inventing a display value
Scenario: Capture result is displayed
- WHEN the app shows the latest SMS capture result
- THEN it MUST display the original SMS content, sender summary, source, timestamp, and any structured failure reason
Requirement: Support optional Google SMS verification APIs
The app SHALL support Google SMS verification APIs only as optional paths and MUST NOT depend on them for the primary capture behavior.
Scenario: SMS User Consent path is available
- WHEN Google Play services supports SMS User Consent and the user authorizes reading a single SMS
- THEN the app MUST feed that SMS body through the same body-preservation path used by the primary path
Scenario: SMS Retriever path is used with app hash
- WHEN a controlled test SMS includes the app hash required by SMS Retriever
- THEN the app MUST accept the retrieved message and preserve the original SMS body
Scenario: Google SMS API is unavailable
- WHEN Google Play services is missing, disabled, incompatible, times out, or the user declines consent
- THEN the app MUST keep the system SMS broadcast path usable and report the optional path failure separately