How does Android keeps track of how much battery each specific apps used?
There will be low level APIs that Android uses when computing battery stats.


  I am trying to come up with an app that can accurately measure how much battery each apps specifically comsume.


Although this sub isn't for development related questions, check out Batterystats on how to implement battery collection stats.