How can I programmatically detect which apps caused phone to wake up?
<p>Looking for a way to collect a statistics on phone wake ups. And then uninstall that stupid app which does that every 10 minutes on my phone.</p>

<p><strong>Update</strong>: Tried battery apps, they are crap. They show that phone wakes up every 5-15 minutes, but tell me nothing why. They also show how much each app drained, but it always less than 5%.</p>

<p>So I looking for a way to collect this stats and do some analytics with that.</p>

<p><strong>Update II</strong>: Looks like there are battery managers that do the job (GSam Battery Monitor for example), and with a bit of reverse engineering I hope I'll find, how they collect statistics.</p>
