feat: use low power mode when the app is in the background#20202
feat: use low power mode when the app is in the background#20202alexjba wants to merge 8 commits intofeat/local-notificationsfrom
Conversation
Jenkins BuildsClick to see older builds (61)
|
|
Baseline: installed at 11am with 95% |
|
Baseline: Installed at 14.00 with 100% |
|
Baseline: Installed at 18.20 with 100% |
|
Baseline: Installed at 22:45 UTC (17 Mar) with 100% I noticed that when I open the app immediately after minimizing it, either:
|
8083a3b to
2547977
Compare
4eec65e to
f55f3bb
Compare
|
The long splash screen and the blank screen should probably be tackled in a different PR. We have another issue for the blank screen found by @friofry. #19010 |
2547977 to
a3fb90c
Compare
f55f3bb to
ffd77e9
Compare
There was a problem hiding this comment.
Pull request overview
Implements Android Java-layer support for status-go’s low power mode by reporting UI foreground/background state changes to the backend and making those calls non-blocking to avoid ANRs.
Changes:
- Add async UI-visibility reporting with replay-on-reconnect behavior in
StatusGoServiceClient. - Add service-side lifecycle scheduling to call into status-go (
AppStateChange) on UI visibility changes. - Bump
vendor/status-gosubmodule to a commit that includes the new lifecycle capability.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| vendor/status-go | Updates status-go submodule to version that supports lifecycle pause/resume. |
| mobile/android/qt6/src/app/status/mobile/ipc/StatusGoServiceClient.java | Adds async setUiVisible, replay on reconnect, and safer bind/unbind flow. |
| mobile/android/qt6/src/app/status/mobile/ipc/StatusGoService.java | Adds coalesced background execution for backend lifecycle updates on visibility changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
mobile/android/qt6/src/app/status/mobile/ipc/StatusGoServiceClient.java
Outdated
Show resolved
Hide resolved
5d18b86 to
b1382af
Compare
- normalize notification id - parse the status-go json for errors - hook setUIVisible(false) on android app crash - make sure setUIVisible doesn't block the main thread - properly identify group chat notifications
b1382af to
06925c7
Compare
ffd77e9 to
bb34d7d
Compare
bb34d7d to
762ab83
Compare
06925c7 to
af270a6
Compare





What does the PR do
status-im/status-go#7373 introduced a new low power mode where the status-go work can be paused/resumed using the appStateChanged method.
This PR implements the java layer and calls the
appStateChangedwhenever the app goes to background, gets killed, starts or resumes.Affected areas
Android start/stop/background and foreground states.
Quality checklist
My PR is consistent with this document: QML Architecture Guidelines
Impact on end user
The user should see better battery life when the app is running in the background.
How to test
Get a relative power usage for the phone with the usual apps running.
Open the app, login and kill the app.
Observe the power usage for some time and compare with the baseline established before.
Risk
Medium