Reputation: 169
How can I make my device not going to sleep while my application is running, e.g gps is running? I know that might be battery consuming, but for the time being lets get past that.
Upvotes: 1
Views: 823
Reputation: 16570
You could look into a combination of WAKE_LOCK permission and PowerManager.
Upvotes: 1
Reputation: 9908
This has been asked before:
Disabling screen sleep Programatically in Android?
use setKeepScreenOn(true)
.
Upvotes: 2