Skip to content Skip to sidebar Skip to footer

Automatic Turn On In Android Device

I want to develop an app whereby one of it functionality is power on the device when it be powered off. I searched in developer documents but I find anything related to it. There i

Solution 1:

There is nothing in the Android SDK itself for turning the device on from a fully-powered-off state. Some device manufacturers may have features for this, and some subset of those might have an API for it.

Solution 2:

This is possible on normal Linux machines with RTC wake alarm:

$ sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"$ sudo sh -c "echo `date '+%s' -d '+ 3 minutes'` > /sys/class/rtc/rtc0/wakealarm"

I have never tried this on Android, and if it does work, I'd imagine it requires rooting your device. Maybe that'd be good enough for your use case.

As @CommonsWare mentioned, some manufactures seem to support this as a setting. I'm not sure if they have an API, but that might also be worth researching. One of them seems to be Samsung.

Post a Comment for "Automatic Turn On In Android Device"