Click here to Skip to main content
15,905,325 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am developing a application, where i need to show the battery consumption level for each running applications. Is there any api call to get the battery consumption for each running apps.

What I have tried:

i am in search of a api for batter consumption for running apps
Posted
Updated 5-Dec-17 0:48am

 
Share this answer
 
Comments
justin1204 7-Dec-17 4:47am    
thankyou Richard, will check that
There is no such API.

Most current is drawn by shared resources like display, GPS, WLAN, and mobile connection.

You would have to know the current drawn by the above and "assign" it to an application.

All you can do is getting the CPU and GPU load of applications. But that is only significant for applications generating high loads (regarding current consumption) and you still don't know the current drawn.

However, you can track these loads and create averages over fixed time periods. These averages are then indicators for more or less current consumption.
 
Share this answer
 
Comments
justin1204 7-Dec-17 4:47am    
thankyou Jochen for the reply.. sure will check that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900