English 中文(简体)
如何确定甲型六氯环己烷的健康?
原标题:How is the Android battery health determined?

我不谈如何读取价值。

相反,我对曼格拉格的价值感兴趣。 EXTRA_HEALTH正在建立之中。

这是否来自公司知识? 1. 制造商的规格?

如何确定这些价值观?

int BATTERY_HEALTH_COLD 
int BATTERY_HEALTH_DEAD 
int BATTERY_HEALTH_GOOD 
int BATTERY_HEALTH_OVERHEAT 
int BATTERY_HEALTH_OVER_VOLTAGE 
int BATTERY_HEALTH_UNKNOWN  
int BATTERY_HEALTH_UNSPECIFIED_FAILURE

Thanks, Simon

问题回答

更具体地说: 电池健康由司机(油轮)决定。 该司机通过玩具档案系统出口信息(/sys/class/power_ Supply,准确)。 安德森·达龙(截至库尔德工人党,4.4.x)收集了这一信息,并建立了IBatteryPropertiesRegistrar界面。 它不断进行投票(例如,如果你连接或切断一名控股人的联系,则使用环斑-瓦伊特角进行定期更新的排泄性循环,以及POWER次系统的净链接通知)。 该系统的电池统计系统随后对一位有健康感的听众(通过约束器)进行登记,然后获取由健康者公布的数据,

• 检查/动物/阶级/力量——供应,请看:

lrwxrwxrwx root     root              1970-02-05 14:20 ac -> ../../devices/f9923000.i2c/i2c-84/84-006b/power_supply/ac
lrwxrwxrwx root     root              1970-02-05 14:20 batt_therm -> ../../devices/battery_tm_ctrl.78/power_supply/batt_therm
lrwxrwxrwx root     root              1970-02-05 14:20 battery -> ../../devices/f9923000.i2c/i2c-84/84-0036/power_supply/battery
lrwxrwxrwx root     root              1970-02-05 14:20 touch -> ../../devices/virtual/power_supply/touch
lrwxrwxrwx root     root              1970-02-05 14:20 usb -> ../../devices/msm_dwc3/power_supply/usb
lrwxrwxrwx root     root              1970-02-05 14:20 wireless -> ../../devices/bq51013b_wlc.77/power_supply/wireless

然后检查“批量”

/sys/devices/f9923000.i2c/i2c-84/84-0036/power_supply/battery:
-r--r--r-- root     root         4096 2014-02-26 13:26 capacity
-r--r--r-- root     root         4096 2014-02-26 13:26 charge_full_design
-r--r--r-- root     root         4096 2014-02-26 13:26 current_now
lrwxrwxrwx root     root              2014-02-26 13:26 device -> ../../../84-0036
-r--r--r-- root     root         4096 2014-02-26 13:26 health
drwxr-xr-x root     root              2014-02-26 13:26 power
-r--r--r-- root     root         4096 2014-02-26 13:26 present
-r--r--r-- root     root         4096 2014-02-26 13:26 status
lrwxrwxrwx root     root              2014-02-26 13:26 subsystem -> ../../../../../../class/power_supply
-r--r--r-- root     root         4096 2014-02-26 13:26 technology
-r--r--r-- root     root         4096 2014-02-26 13:26 temp
-r--r--r-- root     root         4096 2014-02-26 13:26 type
-rw-r--r-- root     root         4096 2014-02-26 13:26 uevent
-r--r--r-- root     root         4096 2014-02-26 13:26 voltage_max_design
-r--r--r-- root     root         4096 2014-02-26 13:26 voltage_min_design
-r--r--r-- root     root         4096 2014-02-26 13:26 voltage_now

and by looking at the files, all details will be revealed.

通过使用该守则,你可以获取有关电池的信息。

private BroadcastReceiver battery_receiver = new BroadcastReceiver()
{
    @Override
    public void onReceive(Context context, Intent intent)
    {
        boolean isPresent = intent.getBooleanExtra("present", false);
        String technology = intent.getStringExtra("technology");
        int plugged = intent.getIntExtra("plugged", -1);
        int scale = intent.getIntExtra("scale", -1);
        int health = intent.getIntExtra("health", 0);
        int status = intent.getIntExtra("status", 0);
        int rawlevel = intent.getIntExtra("level", -1);
        int level = 0;
        String temp=null;

        Bundle bundle = intent.getExtras();

        Log.i("BatteryLevel", bundle.toString());

        if(isPresent)
        {
            if (rawlevel >= 0 && scale > 0) {
                level = (rawlevel * 100) / scale;
            }

            String info = "Battery Level: " + level + "%
";

            info += ("Technology: " + technology + "
");
            info += ("Plugged: " + getPlugTypeString(plugged) + "
");
            info += ("Health: " + getHealthString(health) + "
");
            info += ("Status: " + getStatusString(status) + "
");
            info += ("Temp: "+getTempStatus(temp,intent)+"
");

            setBatteryLevelText(info + "

" + bundle.toString());
        }
        else
        {
            setBatteryLevelText("Battery not present!!!");
        }
    }
};
private void registerBatteryLevelReceiver(){
    IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);

    registerReceiver(battery_receiver, filter);
}

锂离子电池在电脑上安装简单,跟踪和报告健康;国家指标是标准化的,但电池制造商确定导致电池组报告的条件。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签