lbryio / lbry-android

The LBRY Android app
MIT License
2.44k stars 113 forks source link

Background service doesn't stop on closing app #1178

Open bonecountysheriff opened 3 years ago

bonecountysheriff commented 3 years ago
l ## The Issue I want lbry's videos to play in the background, but only when the app hasn't been 'swiped'. However even after swiping, there is a persistent notification saying that lbry is playing in the background. I tried to follow what was here (https://lbry.com/faq/android-basics#stoplbryservice), though I'm not sure because I don't exactly see the setting named "Keep the daemon background service running after closing the app". ### Steps to reproduce 1. Enable background playback 2. Disable background service (in the 'other' section) 3. Swipe the app ### Expected behaviour No trace of lbry after swiping. ### Actual behaviour Persistent/ongoing notification saying that the lbry service is playing in the background with a "stop" buttion. I have to press this everytime I close the app. ## System Configuration - Device: Galaxy s20 - Android version: 10 ## Anything Else

Screenshots

(Will add, give me some time)

Internal Use

Acceptance Criteria

The persistent notification shouldn't show. Disabling notifications is not an option.

Definition of Done

kekkyojin commented 3 years ago

From user perspective, there is a background service still running. However, it is in fact a foreground service. They look quite similar to the user, but code-wise requires some extra-steps for both starting them and stopping them. A fix for this will come soon.

bonecountysheriff commented 3 years ago

You mean nothing runs after the app is swiped?

kekkyojin commented 3 years ago

No, I don't mean it, @georgebushfour20. Swipping or closing any app means "close the app". If the service used was a background one, then service would also be closed. But, as it is a foreground one, although the app itself is closed -no longer in memory- the service is still running.