Class BatteryCtrl

java.lang.Object
com.unitech.api.battery.BatteryCtrl

public class BatteryCtrl extends Object
  • Field Details

  • Constructor Details

    • BatteryCtrl

      public BatteryCtrl(Context context)
  • Method Details

    • getChargingStatus

      public 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 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 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 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 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 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 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 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 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 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 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 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 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 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");