• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help How do I prevent an Android device from going to sleep programmatically??

  • Thread starter Thread starter Android Question
  • Start date Start date

How do I prevent an Android device from going to sleep programmatically??


  • Total voters
    1
A

Android Question

Guest
I want to prevent Android Mobile from going into sleep mode programically
 
You'll have to use the wakelock API in your program.


You should also be aware of how to properly do this in-hand with Google's DOZE:


Cheers!

P.S., if you are a developer, I can move your thread to our Application Development area--just let me know :).
 
Still not 100% sure what you're asking...

Do you mean a blanket "keep awake" mechanism (i.e., some type of Setting you could enable / disable) or are you looking for a single app solution?

Not sure that there's anything other than an app-specific means of keeping the device awake, but that, of course, has to be done by the app developer and not the user...
 
Back
Top Bottom