Class BatteryCtrl

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

public class BatteryCtrl extends Object
  • Field Details

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