Package com.unitech.api.battery
Class BatteryCtrl
java.lang.Object
com.unitech.api.battery.BatteryCtrl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionandroid.os.BundleGet Backup Battery Charging Statusandroid.os.BundleGet Backup Battery Voltageandroid.os.BundleGet Battery Levelandroid.os.BundleGet Charging Statusandroid.os.BundleGet Currentandroid.os.BundleGet Cycle Countandroid.os.BundleGet Date Of Manufactureandroid.os.BundleGet Plugged In Statusandroid.os.BundleGet Serial Numberandroid.os.BundleGet State Of Healthandroid.os.BundleGet Technologyandroid.os.BundleGet Temperatureandroid.os.BundleGet Voltageandroid.os.BundlesetChargingLimit(int limit) Set Battery Charging Limit
-
Field Details
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Constructor Details
-
BatteryCtrl
public BatteryCtrl(android.content.Context context)
-
-
Method Details
-
getChargingStatus
public android.os.Bundle getChargingStatus()Get Charging Status- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getChargingStatus=bundle.getString("getChargingStatus");
-
getCycleCount
public android.os.Bundle getCycleCount()Get Cycle Count- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getCycleCount=bundle.getString("getCycleCount");
-
getDateOfManufacture
public android.os.Bundle getDateOfManufacture()Get Date Of Manufacture- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getDateOfManufacture=bundle.getString("getDateOfManufacture");
-
getBatteryLevel
public android.os.Bundle getBatteryLevel()Get Battery Level- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getBatteryLevel=bundle.getString("getBatteryLevel");
-
getPluggedInStatus
public android.os.Bundle getPluggedInStatus()Get Plugged In Status- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getPluggedInStatus=bundle.getString("getPluggedInStatus");
-
getSerialNumber
public android.os.Bundle getSerialNumber()Get Serial Number- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getSerialNumber=bundle.getString("getSerialNumber");
-
getStateOfHealth
public android.os.Bundle getStateOfHealth()Get State Of Health- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getStateOfHealth=bundle.getString("getStateOfHealth");
-
getTechnology
public android.os.Bundle getTechnology()Get Technology- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getTechnology=bundle.getString("getTechnology");
-
getTemperature
public android.os.Bundle getTemperature()Get Temperature- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getTemperature=bundle.getString("getTemperature");
-
getVoltage
public android.os.Bundle getVoltage()Get Voltage- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getVoltage=bundle.getString("getVoltage");
-
getCurrent
public android.os.Bundle getCurrent()Get Current- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getCurrent=bundle.getString("getCurrent");
-
getBackupBatteryVoltage
public android.os.Bundle getBackupBatteryVoltage()Get Backup Battery Voltage- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getBackupBatteryVoltage=bundle.getString("getBackupBatteryVoltage");
-
getBackupBatteryChargingStatus
public android.os.Bundle getBackupBatteryChargingStatus()Get Backup Battery Charging Status- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getBackupBatteryChargingStatus=bundle.getString("getBackupBatteryChargingStatus");
-
setChargingLimit
public android.os.Bundle setChargingLimit(int limit) Set Battery Charging Limit- Parameters:
limit- the charging limit value should be within 50~100- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-