简体   繁体   中英

Power profiles in android

I looked into http://source.android.com/devices/tech/power.html , where "battery.capacity" is there and "WiFi.on" ,"WiFi.active" are there, but how to use them any Ideas?

thank you.

When your app is running the system computes the amount of power each component uses. The values of wifi.on, wifi.active are actually power drain reported by system in mA.

The battery.capacity value is reported in mAh(milliamp-hours).

By using this value you can check which part of your application consuming more power as you know with which component that part relates to.

If you take a look at the file /frameworks/base/core/res/res/xml/power_profile.xml it would look something like this .

I don't think there is any api-support available in the sdk to see if they can be used. These values are provided by the device manufacturer I believe. However you could root your phone to read these I suppose

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM