Is there any way to profile the battery usage by the application in development environment or real time?
BatteryManager seems not providing any per application API
you can use the two classes: IBatteryStats and BatteryStatsImplernal in package com.android.internal, they provide methods to get the statistics of battery usage.