cloudstream icon indicating copy to clipboard operation
cloudstream copied to clipboard

app doesn't stay in the background.

Open DeepakTCO opened this issue 2 months ago • 11 comments

Steps to reproduce

Play something from some provider (any of your choosing) for example cinestream and choose any source it doesn't matter pause the video then go to another app or home screen use the other app for more than 10 to 15 seconds go back to the cloudstream it will exit the player saying no links found.

Expected behavior

It should have kept the video in the background and when opened the video should have played simply by tapping the play button

Actual behavior

but it doesn't stay on the player and exits immediately

Cloudstream version and commit hash

latest pre release

Android version

android 15

Logcat


Other details

I have already given cloudstream unrestricted battery usage permission so that isnt a solution that's working for me.

Acknowledgements

  • [x] I am sure my issue is related to the app and NOT some extension.
  • [x] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [x] I have written a short but informative title.
  • [x] I have updated the app to pre-release version Latest.
  • [x] I will fill out all of the requested information in this form.

DeepakTCO avatar Oct 27 '25 19:10 DeepakTCO

Hello PROFESS00R. Please do not report any provider bugs here. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the discord.

Found provider name: CineStream

recloudstream[bot] avatar Oct 27 '25 19:10 recloudstream[bot]

Make sure that battery optimization is disabled for the app. Ive noticed this before as well and it had to do with that for me anyway.

Luna712 avatar Oct 27 '25 19:10 Luna712

Make sure that battery optimization is disabled for the app. Ive noticed this before as well and it had to do with that for me anyway.

I did that already still i face this issue. I have mentioned it above too. Still it exits the player i have choose the server again and let it load again which sometimes becomes a hasssle. Like even if you take some time to chat with someone and you come back it's gone

DeepakTCO avatar Oct 27 '25 19:10 DeepakTCO

Make sure that battery optimization is disabled for the app. Ive noticed this before as well and it had to do with that for me anyway.

I did that already still i face this issue. I have mentioned it above too. Still it exits the player i have choose the server again and let it load again which sometimes becomes a hasssle. Like even if you take some time to chat with someone and you come back it's gone

Sorry, I missed that part about unrestricted battery usage.

It might happen if you play it and leave before it loads but ive never encountered it where it randomly exits after loading is complete even when I come back to the app 30 minutes later.

Luna712 avatar Oct 27 '25 19:10 Luna712

Make sure that battery optimization is disabled for the app. Ive noticed this before as well and it had to do with that for me anyway.

I did that already still i face this issue. I have mentioned it above too. Still it exits the player i have choose the server again and let it load again which sometimes becomes a hasssle. Like even if you take some time to chat with someone and you come back it's gone

Sorry, I missed that part about unrestricted battery usage.

It might happen if you play it and leave before it loads but ive never encountered it where it randomly exits after loading is complete even when I come back to the app 30 minutes later.

That's very fortunate for you. I can only dream of it. even after it loads completely and I have been watching it for like 40 min out of 1 hr then if I go to another app for 20 seconds even then the whole progress is gone when i come back.

DeepakTCO avatar Oct 27 '25 19:10 DeepakTCO

Android aggressively kills anything, especially network requests in the background. Nothing in our code actually checks if the app is open when loading links or playing video, so it is not a design decision. Furthermore, even workmanagers are now getting restricted if you do not have a foreground service with a notification.

fire-light42 avatar Oct 27 '25 22:10 fire-light42

We cannot fix the app getting restarted by terrible battery optimizations, but I think it would be possible to save the loaded links to restart playback without booting the user out of the player. It would not be as seamless as you would want, but it would prevent having to reload links.

CranberrySoup avatar Oct 27 '25 22:10 CranberrySoup

Android aggressively kills anything, especially network requests in the background. Nothing in our code actually checks if the app is open when loading links or playing video, so it is not a design decision. Furthermore, even workmanagers are now getting restricted if you do not have a foreground service with a notification.

Can we have foreground service then? It just really kills the experience for me.

DeepakTCO avatar Oct 28 '25 04:10 DeepakTCO

We cannot fix the app getting restarted by terrible battery optimizations, but I think it would be possible to save the loaded links to restart playback without booting the user out of the player. It would not be as seamless as you would want, but it would prevent having to reload links.

That would be amazing too. I will take anything at this point😆

DeepakTCO avatar Oct 28 '25 04:10 DeepakTCO

Sorry to disturb but are you guys planning to add foreground service?

DeepakTCO avatar Oct 28 '25 22:10 DeepakTCO

Sorry to disturb but are you guys planning to add foreground service?

Again sorry for distributing. As a binge watcher it's really annoying for me and would love some solution at least. Wouldn't mind having foreground service so cloudstream can be active in the background.

DeepakTCO avatar Nov 12 '25 17:11 DeepakTCO