Keep WiFi running when screen is off and phone is locked (streaming with black screen, battery saving, newpipe, podcasts)
How do I keep my WiFi running when my phone's screen is off and locked?
- The biggest battery drain is my screen usage
- WiFi uses your battery, but not nearly as badly as the screen
- I use my phone to stream audio
- I intentionally turn off my phone's screen to save my phone's battery
- If I'm playing a local file that I previously downloaded, then I have no issues with the audio stopping when my screen is off.
- If I'm streaming audio, then sometime after I turn off my phone's screen, the audio streaming stops (I guess after it locks and the the stream buffer is empty)
- Immediately after I wake my screen, the audio stream resumes. Unlocking the phone is not necessary to resume the audio stream.
I assume, therefore, that my phone is disabling my WiFi sometime after my handset's screen is turned off.
I am running LineageOS 18 (Android 11).
How do I prevent my android device from disabling my WiFi when the screen is off?
To accomplish what you want, you can install the app https://f-droid.org/en/packages/android.jonas.fakestandby/ . It is a free open-source application.
Fake Standby will turn off your screen while keeping apps running. This will allow you to listen to audio (podcasts, for example) without draining your battery so much.
I've used it many times, and it has worked well for me.