Whether there is any formula ,Api or method for it? I want to test the power consumption of different apps.
In order to analyse the power consumption, e.g. to estimate the mAh usage, checkout:
To see what's happening live (wakelocks, cpu, sensors, etc.):
To see what happened over time, e.g. this day:
I haven't found out yet if it's possible to see an estimated mAh consumption instead ob abstract "low, mid, high" units in the Profiler. Comment please if you do so. The Historian should be able to do so based on the documentation.