BatteryOptimizationManager.settingsIntent() (push/BatteryOptimizationManager.kt, ~lines
44-52) currently deep-links to Settings.ACTION_APPLICATION_DETAILS_SETTINGS — the app's general
info page — which requires the user to then manually navigate into "Battery" (naming and depth
vary by OEM) and choose "Unrestricted"/"Optimized" themselves. BatteryOptimizationScreen.kt's
"Take me there" button launches this intent as the final onboarding step. The ticket asks for the
deep link to land directly on the sub-screen with those radio options, skipping the extra taps.
Note the existing KDoc on BatteryOptimizationManager already explains a deliberate constraint
here: the code avoids the restricted REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission/dialog
because Google Play limits it to an approved set of use cases (rejection risk, see #17) — any fix
here must stay within that same constraint (no restricted permissions, Play/F-Droid-safe).
Scope
Spike: determine whether a documented Android intent action exists that lands directly on
the per-app battery/background-activity sub-screen (the one with
"Optimized"/"Unrestricted"/"Restricted") rather than the app-info page. There is no single
universal public Settings.ACTION_* constant guaranteed to land there across all OEMs —
confirm what's reliably available on stock/AOSP (and note where Samsung/other OEM skins
diverge).
Where a more direct intent is available and doesn't require a restricted permission, update settingsIntent() to target it, with a fallback to today's app-details intent when it can't
be resolved (resolveActivity check) or on OEMs where it doesn't apply.
Update the KDoc rationale in BatteryOptimizationManager to reflect the new approach and
its OEM caveats.
Acceptance criteria
On stock Android (and any other OEMs the spike confirms support it), tapping "Take me there" on
the battery-optimization onboarding screen lands directly on the
"Optimized"/"Unrestricted"/"Restricted" screen, not the general app-info page.
On devices/OEMs without a better deep link, falls back to today's app-details behavior rather
than failing.
No restricted permissions introduced (stays consistent with the existing Play-safety rationale).
Spike first, like #125 — confirm feasibility across OEMs/API levels before committing to an
implementation; the payoff (saving the user 1-2 taps) is real but modest, so this shouldn't turn
into an open-ended per-OEM intent registry.
## Context
`BatteryOptimizationManager.settingsIntent()` (`push/BatteryOptimizationManager.kt`, ~lines
44-52) currently deep-links to `Settings.ACTION_APPLICATION_DETAILS_SETTINGS` — the app's general
info page — which requires the user to then manually navigate into "Battery" (naming and depth
vary by OEM) and choose "Unrestricted"/"Optimized" themselves. `BatteryOptimizationScreen.kt`'s
"Take me there" button launches this intent as the final onboarding step. The ticket asks for the
deep link to land directly on the sub-screen with those radio options, skipping the extra taps.
Note the existing KDoc on `BatteryOptimizationManager` already explains a deliberate constraint
here: the code avoids the restricted `REQUEST_IGNORE_BATTERY_OPTIMIZATIONS` permission/dialog
because Google Play limits it to an approved set of use cases (rejection risk, see #17) — any fix
here must stay within that same constraint (no restricted permissions, Play/F-Droid-safe).
## Scope
- [ ] Spike: determine whether a documented Android intent action exists that lands directly on
the per-app battery/background-activity sub-screen (the one with
"Optimized"/"Unrestricted"/"Restricted") rather than the app-info page. There is no single
universal public `Settings.ACTION_*` constant guaranteed to land there across all OEMs —
confirm what's reliably available on stock/AOSP (and note where Samsung/other OEM skins
diverge).
- [ ] Where a more direct intent is available and doesn't require a restricted permission, update
`settingsIntent()` to target it, with a fallback to today's app-details intent when it can't
be resolved (`resolveActivity` check) or on OEMs where it doesn't apply.
- [ ] Update the KDoc rationale in `BatteryOptimizationManager` to reflect the new approach and
its OEM caveats.
## Acceptance criteria
- On stock Android (and any other OEMs the spike confirms support it), tapping "Take me there" on
the battery-optimization onboarding screen lands directly on the
"Optimized"/"Unrestricted"/"Restricted" screen, not the general app-info page.
- On devices/OEMs without a better deep link, falls back to today's app-details behavior rather
than failing.
- No restricted permissions introduced (stays consistent with the existing Play-safety rationale).
## Relevant files
- `push/BatteryOptimizationManager.kt`, `ui/onboarding/BatteryOptimizationScreen.kt`.
## Notes
Spike first, like #125 — confirm feasibility across OEMs/API levels before committing to an
implementation; the payoff (saving the user 1-2 taps) is real but modest, so this shouldn't turn
into an open-ended per-OEM intent registry.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
BatteryOptimizationManager.settingsIntent()(push/BatteryOptimizationManager.kt, ~lines44-52) currently deep-links to
Settings.ACTION_APPLICATION_DETAILS_SETTINGS— the app's generalinfo page — which requires the user to then manually navigate into "Battery" (naming and depth
vary by OEM) and choose "Unrestricted"/"Optimized" themselves.
BatteryOptimizationScreen.kt's"Take me there" button launches this intent as the final onboarding step. The ticket asks for the
deep link to land directly on the sub-screen with those radio options, skipping the extra taps.
Note the existing KDoc on
BatteryOptimizationManageralready explains a deliberate constrainthere: the code avoids the restricted
REQUEST_IGNORE_BATTERY_OPTIMIZATIONSpermission/dialogbecause Google Play limits it to an approved set of use cases (rejection risk, see #17) — any fix
here must stay within that same constraint (no restricted permissions, Play/F-Droid-safe).
Scope
the per-app battery/background-activity sub-screen (the one with
"Optimized"/"Unrestricted"/"Restricted") rather than the app-info page. There is no single
universal public
Settings.ACTION_*constant guaranteed to land there across all OEMs —confirm what's reliably available on stock/AOSP (and note where Samsung/other OEM skins
diverge).
settingsIntent()to target it, with a fallback to today's app-details intent when it can'tbe resolved (
resolveActivitycheck) or on OEMs where it doesn't apply.BatteryOptimizationManagerto reflect the new approach andits OEM caveats.
Acceptance criteria
the battery-optimization onboarding screen lands directly on the
"Optimized"/"Unrestricted"/"Restricted" screen, not the general app-info page.
than failing.
Relevant files
push/BatteryOptimizationManager.kt,ui/onboarding/BatteryOptimizationScreen.kt.Notes
Spike first, like #125 — confirm feasibility across OEMs/API levels before committing to an
implementation; the payoff (saving the user 1-2 taps) is real but modest, so this shouldn't turn
into an open-ended per-OEM intent registry.