Search code examples
androidwakelockandroid-wake-lock

How to check active wakelocks - android API


I'm writing an app to find all the wake locks which are acquired and the time in which they were active? Is there any android SDK API available to get this information?

Answers in below qn suggests to get the information using proc through adb shell. Is it the only way to fetch the wakelock information or is there any workaround to get it in android framework?

How can I see which wakelocks are active


Solution

  • Is there any android SDK API available to get this information?

    Not at the present time.