简体   繁体   中英

How to run Android app on tablet nonstop with display turned on

I am developing a mobile monitoring system on Android, so I need a platform, that is mobile, lightweighted and that has some computing performance. I have chosen Android, but I've run to a problem that tablet's chargers cant catch up with power consumption.

I can't know for sure how much CPU will application consume (maybe 30%, 40%?), but let's say 100% to be sure.

Is there a way to achieve nonstop run? Maybe tablet with non-usb charger?

edit: Simply speaking I need to charge the device more quickly, then it consume power. Optimization and lowering power consumption by turning down hardware that is not needed right now doesnt seem as a solution since application can be used for entire time...

What you want is aa partial WakeLock.

WakeLock gives you the ability to stop the device from entering sleep-mode. There are several levels of Wakelock, you are (if I'm correct) interested in turning of the screen to minimize the power consumption but not put the device to sleep and halt computation. For this there is PARTIAL_WAKE_LOCK .

Make sure to have the right permission for your app before acquiring the WakeLock or you will get a security permission.

Another thing you might want to consider is to use a high-output charger that supplies more than the lowest rated chargers (500mA).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM