[Q] Determining the reason for the last wake

Hi. My first post. Long time lurker. Yay me. (Not sure this is exactly the right forum, but I don't see another more appropriate one... so here we go... mods can move if needed...)

In any case, I'm looking for an API within android, available either within the app framework or at the kernel level, which will give me the reason for the current wake. Meaning, I'd like to determine whether the processor/system was woken because of a user key press, a network packet, or an app alarm (RTC), and if it was requested by an app, which app.

I've browsed the java app APIs, as well as /proc and some parts of the kernel source, but haven't found anything. (I'm familiar with PowerManager and wake locks, etc., but as I undertand them they only indicate that an app is [might be] preventing the system from sleeping right now, not that it was responsible for waking the system this time.)

Could I get some pointers to some APIs or such to get this info?

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by milford.wisoky
4 hours ago
Last post by doyle.zula
3 hours ago
Last post by vwalter
12 minutes ago
Buy Back
Started by rubye97
Last post by ada.davis
4 hours ago
Last post by qsmith
3 hours ago
Last post by brandyn04
3 hours ago
Last post by thea51
1 hour ago
Last post by trace49
3 hours ago