Repository navigation
feat(service): add a Quick Settings tile for the radio connection - #7662
Draft
jamesarich wants to merge 2 commits into
Draft
jamesarich wants to merge 2 commits into
jamesarich wants to merge 2 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The foreground service owns the radio link on Android, so the tile shows live connection state and connects or disconnects the selected radio instead of only opening the app. - `MeshQuickSettingsTileService` is an active tile, refreshed through `TileService.requestListeningState` whenever the mapped state changes. - `quickSettingsTileState` maps connection state, the selected radio and our short name onto the tile and the tap action. - A tap disconnects the same way the Connect tab does (deselect the radio), reconnects through the reselect repair path while the service runs, and otherwise starts the service with a new `QuickSettingsTile` trigger. The platform lists no exemption for a tile tap, so that start is allowed only while the app is visible or exempt from battery optimizations; when refused, or with no radio selected, the tile opens the Connect tab. - `MeshService.startService` now reports whether the start went through.
An active tile is bound only when the app requests it, so one added while
the connection was steady stayed blank until the next state change; it now
requests a refresh in `onTileAdded`.
SystemUI temp-allowlists the app for a tile click ("tile onclick", seen on
API 36), so the tile now always attempts the foreground start and falls
back to opening the app when the platform refuses it. The battery
optimization check is gone.
jamesarich
force-pushed
the
feat/quick-settings-tile
branch
from
October 18, 2026 17:08
21c0cdf to
fbe4a2e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Android the foreground service owns the radio link, so a Quick Settings tile can show the live connection and connect or disconnect from the shade. Apple's new Control Center controls (Meshtastic-Apple#2668) can only open the app.
🌟 New Features
🛠️ Refactoring & Architecture
ServiceStartTrigger.QuickSettingsTile. SystemUI temp-allowlists the app for a tile click ("tile onclick", 15 s), soForegroundStartPolicyalways attempts it;MeshService.startServicenow returns whether the start went through, so a refusal falls back to opening the app.onTileAdded; an active tile is bound only on request, so one added while the state was steady stayed blank.BundledSqliteGuardTest's expected entry points.MeshService.ktpicks up a spotless reformat ofscheduleDeviceAddressResolution.📝 Documentation
Testing Performed
QuickSettingsTileStateTest(new): the state mapping for every connection state, for no radio selected, and for a stopped service.ForegroundStartPolicyTest: a tile tap is attempted from the background on every restricted level.spotlessApply spotlessCheck detekt detektTypeResolved assembleDebug test allTests kmpSmokeCompile -PwarningsAsErrors=true) green locally.Background started FGS: Allowed ... tile onclick, the service started and reconnected, the app stayed in the background.Constitution Check
core:service/androidMainonly.last_updatedbumped.