Android Question Force power off when not charging

windthings

Member
Licensed User
Longtime User
I want to use a tablet for a single app on a boat, once a week, and the tablet will be bolted down. The users (mainly technophobes) will probably cope with the tablet power switch and selecting the app, and the tablet charge to keep the display alive will be switched on with other boat supplies. My worry is that the users will switch off the boat supplies and forget to shut down the tablet resulting in a flat tablet battery the following week. Is it possible to force the tablet to power off when the charge is removed? Is there a better forum for this question?
 

windthings

Member
Licensed User
Longtime User
Thanks Martin. BatteryChanged will detect when the charger is disconnected, I would still like to find a way to shut down the tablet from B4A if possible
 
Upvote 0

HotShoe

Well-Known Member
Licensed User
Longtime User
It's possible if the device is rooted. If so you can call reboot -p. Otherwise it must be a system app.

--- Jem
 
Upvote 0
Top