1. Use a script
You can use a script via the terminal to simulate a long action and prevent the screen from timing out. Create the script below and run via Terminal Emulator on your phone. It simulates pressing the letter r and Enter, then wait for a second before repeating the process for the number of times you choose with i.
Create a file and put the ...
If it's sufficient for you to only keep screen on when charging, you can turn on the Stay awake option in Developer options.
To do this:
Open Settings, navigate to About [device] (tablet, phone etc.)
Find Build number entry there. If there's none, it may be in Software information subsection.
Tap Build number 7 times
Make sure that a message pops up saying ...
The app MacroDroid has a feature to set screen timeout to never. I did not test it for long but the app is free, so you can give it a try.
Install the app and enable the permission "modify system settings". Afterwards, setup a macro like this:
Trigger: setup a Trigger of your liking.
Action: Screen Timeout -> never
Constraint: only if you need, ...
With a relatively modern Android version, there is no need to trust a 3rd party app, which probably explains the app landscape observed.
There are three settings that can be managed to allow the screen to dim without locking the phone. These features have been around since at least 4.4.
settings > display > sleep is the amount of time the screen ...
If you are on LineageOS there is a custom tile called Caffeine which you can press repeatedly to increase screen timeout to infinity.
An app to replicate this is Caffeinate. Nougat (7.0+) is required to enable the quick settings tile.
It maybe that text notifications are waking up the screen at night. In that case you may need to completely disable notifications at night.
Some resolutions include:
Turn off message notification completely
You can stop the screen from turning on when you receive a message by disabling the message notification completely but you lose all the notifications,...
If you're using Pandora, you need to uncheck "Conserve battery option" option under the Menu > Settings > Advanced. Now the screen will stay on while the music is playing on Pandora.
You can also download the apps like KeepScreen and Stay Alive to block screen timeout when predefined applications are active.