Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Jan 26, 2026

This PR:
2. Adds battery saving sync intervals when the app goes to the background

Description

When the app is backgrounded, the Lightning node now switches to battery-saving sync intervals using the new RuntimeSyncIntervals API from ldk-node. When the app returns to the foreground, normal sync intervals are restored. This reduces battery drain while keeping the node active for receiving payments.

The SDK update also adds a new claimableOnCloseSats property to channel details, which is now included in mock data and extensions.

Preview

N/a - No UI changes.

QA Notes

  1. Test background behavior

    • Open the app and wait for the node to start
    • Background the app by pressing the home button
    • Check logcat for: Sync intervals entered battery saving mode
    • Foreground the app
    • Check logcat for: Sync intervals exited battery saving mode
  2. Test normal operation

    • Verify payments can still be sent and received
    • Verify wallet balance updates correctly
    • Verify channel information displays properly

@claude

This comment has been minimized.

@jvsena42
Copy link
Member

IMHO we could delay this feature to the next week, after Plan B, to avoid unforeseen bugs such as those caused by graph caching

@ovitrif ovitrif marked this pull request as draft January 26, 2026 13:57
@ovitrif
Copy link
Collaborator Author

ovitrif commented Jan 26, 2026

Drafted for this:

IMHO we could delay this feature to the next week, after Plan B, to avoid unforeseen bugs such as those caused by graph caching

And also for the fact that it doesn't even work yet the way it's supposed to work.

@jvsena42
Copy link
Member

Drafted for this:

IMHO we could delay this feature to the next week, after Plan B, to avoid unforeseen bugs such as those caused by graph caching

And also for the fact that it doesn't even work yet the way it's supposed to work.

Indeed, I wasn't getting the expected logs

- Update `ldk-node-android` dependency to version `v0.7.0-rc.17`
- Update `ChannelDetails` extensions and UI mock data to include the new `claimableOnCloseSats` property required by the SDK update
@ovitrif ovitrif force-pushed the feat/node-service-battery-save branch from 127663a to 8a6ad11 Compare January 26, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants