Reputation: 424
I am writing a power management application for Android.
I want to be able to access wake lock statistics in my application. Details like which wake locks are active now, how many of them are partial, full..etc, which wake lock prevented device from entering sleep and so. Is there a way i can do this..?
Thanks in advance.
Upvotes: 2
Views: 1775
Reputation: 1006644
Is there a way i can do this..?
You are welcome to track your own app's own use of WakeLock
yourself. You do not have access, from an app, to data about other apps' use of WakeLock
.
Developers can use adb shell dumpsys power
to see what WakeLock
s are outstanding, as is illustrated in this SO question and its answers.
Upvotes: 3