is there any application to automatically turn an android device off after a predetermined period of time?

vestmoria@linux.community to Android@lemmy.world – 24 points –

When I go to bed I use my smartphone to listen to something soothing and I fall asleep. It usually takes less than an hour.

Im looking for an application that turns the device off after one hour, pretty much like the sleep command works (on linux):

sleep 60m && shutdown now

alternatively, your ways to save as much battery as possible after the hour passes (won't use the device for the next 8 hours)

11

Something like MacroDroid or Tasker?

This. I used to use Tasker and AutoInput to automatically reboot my phone every night. You can train AutoInput to tap on stuff in a sequence. I had Tasker pull up the Power Menu and AutoInput tap the Restart button. You can probably do similar with the Power Off button there

What's your source of audio? Some media players have a timer where it'll only play for a set time. Audible has it under "timer", podcast addict has it under "sleep timer".

On a rooted device or with adb you can execute the command:

sleep 60m && reboot -p

Alternative is better saver+airplane mode. Shouldn't lose more than a couple percent battery.