0

Is there a way to find programmatically what application holds you mobile awake after screen is OFF?

I need to detect what application holds awake, to make some statistics for the user?

For example on Feb 11, 13:44 app X holds awake for 20 minutes. etc

Alex
  • 239
  • 5
  • 12

1 Answers1

3

This might be a repost of How can I see which wakelocks are active, which is a realtively thorough discussion on wakelocks. Essentially, you can gather the wakelock info from the dump of running adb shell dumpsys power.

Community
  • 1
  • 1
Brent Hronik
  • 2,357
  • 1
  • 27
  • 43