Skip to content

fix: improve foreground notification#687

Merged
jvsena42 merged 11 commits into
masterfrom
fix/dismissable-foreground-notification
Jan 21, 2026
Merged

fix: improve foreground notification#687
jvsena42 merged 11 commits into
masterfrom
fix/dismissable-foreground-notification

Conversation

@jvsena42

@jvsena42 jvsena42 commented Jan 20, 2026

Copy link
Copy Markdown
Member

Fixes #651
Fixes #658

This PR fixes multiple issues with the foreground notification in LightningNodeService:

Description

  1. Makes the notification non-dismissable by adding .setOngoing(true)
  2. Handles Android 15+ foreground service timeout by implementing onTimeout() callback
  3. Improves the notification icon and adds brand color for better visibility
  4. Removes redundant duplicate startForeground() call

Preview

api-level-36.webm
api-level-33.webm

QA Notes

1. Non-dismissable notification

  1. Open the app with a configured wallet
  2. Pull down the notification shade
  3. Try to swipe away the "Bitkit is running" notification
  4. Node: on API level 33+ (android 13) it is possible to hide ongoing notifications, see preview

2. Notification appearance

  1. Check the notification in the notification shade
  2. Verify: Icon is recognizable with brand orange color (#FF4400)

3. Android 15+ timeout handling (optional)

To test the FGS timeout on Android 15 (not above):

adb shell am compat enable FGS_INTRODUCE_TIME_LIMITS to.bitkit
adb shell device_config put activity_manager data_sync_fgs_timeout_duration 60000

Wait 60 seconds and verify the service stops gracefully without crash.

Comment thread app/src/main/java/to/bitkit/androidServices/LightningNodeService.kt Fixed
@jvsena42 jvsena42 self-assigned this Jan 20, 2026
@jvsena42 jvsena42 marked this pull request as ready for review January 20, 2026 20:19
@claude

This comment has been minimized.

@ovitrif

This comment was marked as resolved.

@claude

This comment has been minimized.

@claude

This comment has been minimized.

@jvsena42 jvsena42 requested a review from ovitrif January 20, 2026 20:56
@jvsena42

Copy link
Copy Markdown
Member Author

Still not tested the adb commands

@claude

This comment has been minimized.

@ovitrif ovitrif left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utAck

@jvsena42 jvsena42 enabled auto-merge January 21, 2026 13:38
@jvsena42 jvsena42 merged commit a8cdab9 into master Jan 21, 2026
28 of 32 checks passed
@jvsena42 jvsena42 deleted the fix/dismissable-foreground-notification branch January 21, 2026 14:27
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.

App running in background notification is dismiss-able [UI]: Background receive payment notification icon is unrecognisable

3 participants