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?