mirror of
https://github.com/Monkopedia/rouse-context.git
synced 2026-11-29 11:13:05 +00:00
Android 14+ tightened background-activity-start rules: the sender of a PendingIntent must hold BAL privilege at send() time. Rouse's FOREGROUND_SERVICE_TYPE_DATA_SYNC does NOT grant BAL, so open_link and launch_app silently no-op when the app is backgrounded on Pixel 10 Pro and similar API 34+ devices. This change adds a two-part fix: 1. SYSTEM_ALERT_WINDOW opt-in in the Outreach setup screen. When the user enables it and grants the OS permission, the PendingIntent path keeps working as before. The new SwitchRow only appears on API 34+ (`directLaunchApplicable`); older devices don't need the workaround. 2. Tap-to-launch notification fallback when the opt-in is off or denied. A new LaunchRequestNotifier in :notifications posts a notification whose tap fires the PendingIntent — notification-tap launches bypass BAL restrictions. The channel `rouse_outreach_launch` defaults to IMPORTANCE_DEFAULT so it shows in the shade without heads-up. OutreachMcpProvider now takes a `canLaunchDirectly` predicate and an optional `LaunchRequestNotifierApi`. OutreachIntegration wires both from the IntegrationSettingsStore toggle and the overlay permission check, so the decision is re-evaluated on every tool call. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle.kts | ||