DJI Mobile SDK Documentation

      class BatteryKey

      class BatteryKey extends DJIKey
      Package:dji.keysdk
      Inherits From:DJIKey
      Description:

      BatteryKey is a key dedicated to accessing Battery related attributes.

      Class Members:
      Single Battery Products
      method
      method create
      static BatteryKey create(@BatteryParamKey @NonNull String paramKey)
      Package:dji.keysdk
      Description:

      Creates a Battery key.

      Input Parameters:
      @BatteryParamKey @NonNull String paramKeyA valid paramKey.
      Return:
      static BatteryKeyBattery Key
      Multi Battery Products
      method
      method create
      static BatteryKey create(@BatteryParamKey @NonNull String paramKey,
      @IntRange(from = 0, to = MAX_COMPONENT_INDEX) int componentIndex)
      Package:dji.keysdk
      Description:

      Creates a battery key at selected index. Use this when the product supports multiple batteries.

      Input Parameters:
      @BatteryParamKey @NonNull String paramKeyA valid paramKey.
      @IntRange(from = 0, to = MAX_COMPONENT_INDEX) int componentIndexThe index of the Battery component.
      Return:
      static BatteryKeyBattery Key
      Battery AggregationKey
      method
      method createBatteryAggregationKey
      static BatteryKey createBatteryAggregationKey(@BatteryAggregationParamKey @NonNull String paramKey)
      Package:dji.keysdk
      Description:

      Creates a Battery Aggregation key.

      Input Parameters:
      @BatteryAggregationParamKey @NonNull String paramKeyA valid paramKey.
      Return:
      static BatteryKeyAn object of BatteryKey.
      Inherited Methods:
      Class Keys:

      SELF_DISCHARGE_IN_DAYS

      Access:

      SET, GET

      Type:

      Integer

      API:

      setSelfDischargeInDays

      getSelfDischargeInDays

      BATTERY_TYPE

      Access:

      GET

      Type:

      DataSmartBatteryGetStaticData.SmartBatteryType

      API:

      -

      OVERVIEWS

      Access:

      GET

      Type:

      BatteryOverview[]

      API:

      getBatteryOverviews

      BatteryOverview

      SELF_HEATING_STATE

      Access:

      GET

      Type:

      SelfHeatingState

      API:

      -

      AGGREGATION_STATE

      Access:

      GET

      Type:

      AggregationState

      API:

      setAggregationStateCallback

      AggregationState

      onUpdate

      Callback

      HIGHEST_TEMPERATURE

      Access:

      GET

      Type:

      Integer

      API:

      getHighestTemperature

      LEVEL_2_CELL_VOLTAGE_BEHAVIOR

      Access:

      SET, GET

      Type:

      LowVoltageBehavior

      API:

      setLevel2CellVoltageBehavior

      getLevel2CellVoltageBehavior

      LowVoltageBehavior

      LEVEL_2_CELL_VOLTAGE_THRESHOLD

      Access:

      SET, GET

      Type:

      Integer

      API:

      setLevel2CellVoltageThreshold

      getLevel2CellVoltageThreshold

      LIFETIME_REMAINING

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getLifetimeRemaining

      IS_BATTERY_SELF_HEATING

      Access:

      GET

      Type:

      Boolean

      API:

      -

      CURRENT

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getCurrent

      getCurrent

      DESIGN_CAPACITY

      Access:

      GET

      Type:

      Integer

      API:

      -

      IS_CELL_DAMAGED

      Access:

      GET

      Type:

      Boolean

      API:

      isCellDamaged

      NUMBER_OF_CELLS

      Access:

      SET, GET

      Type:

      Integer

      API:

      getNumberOfCells

      setNumberOfCells

      PRODUCTION_DATE

      Access:

      GET

      Type:

      Integer

      API:

      -

      IS_LOW_CELL_VOLTAGE_DETECTED

      Access:

      GET

      Type:

      Boolean

      API:

      isLowCellVoltageDetected

      CHARGE_REMAINING

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getChargeRemaining

      getChargeRemaining

      CHARGE_REMAINING_IN_PERCENT

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getChargeRemainingInPercent

      getChargeRemainingInPercent

      HISTORICAL_WARNING_RECORDS

      Access:

      GET

      Type:

      WarningRecord[]

      API:

      getWarningRecords

      WarningRecord

      LATEST_WARNING_RECORD

      Access:

      GET

      Type:

      WarningRecord

      API:

      getLatestWarningRecord

      WarningRecord

      PAIR_BATTERIES

      Access:

      ACTION

      Type:

      -

      API:

      pairBatteries

      IS_IN_SINGLE_BATTERY_MODE

      Access:

      PUSH

      Type:

      Boolean

      API:

      isInSingleBatteryMode

      NUMBER_OF_DISCHARGES

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getNumberOfDischarges

      CELL_VOLTAGES

      Access:

      GET

      Type:

      Integer[]

      API:

      getCellVoltages

      TEMPERATURE

      Access:

      PUSH, GET

      Type:

      Float

      API:

      getTemperature

      VOLTAGE

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getVoltage

      getVoltage

      PAIRING_STATE

      Access:

      GET

      Type:

      PairingState

      API:

      getPairingState

      PairingState

      LEVEL_1_CELL_VOLTAGE_BEHAVIOR

      Access:

      SET, GET

      Type:

      LowVoltageBehavior

      API:

      setLevel1CellVoltageBehavior

      getLevel1CellVoltageBehavior

      LowVoltageBehavior

      CELL_VOLTAGE_LEVEL

      Access:

      PUSH

      Type:

      BatteryCellVoltageLevel

      API:

      getCellVoltageLevel

      BatteryCellVoltageLevel

      IS_BIG_BATTERY

      Access:

      GET

      Type:

      Boolean

      API:

      -

      CONNECTION_STATE

      Access:

      PUSH, GET

      Type:

      ConnectionState

      API:

      ConnectionState

      NUMBER_OF_CONNECTED_BATTERIES

      Access:

      GET

      Type:

      Integer

      API:

      getNumberOfConnectedBatteries

      FULL_CHARGE_CAPACITY

      Access:

      PUSH, GET

      Type:

      Integer

      API:

      getFullChargeCapacity

      getFullChargeCapacity

      IS_SMART_BATTERY

      Access:

      GET

      Type:

      Boolean

      API:

      isSmartBattery

      SERIAL_NUMBER

      Access:

      GET

      Type:

      String

      API:

      -

      IS_FIRMWARE_DIFFERENCE_DETECTED

      Access:

      GET

      Type:

      Boolean

      API:

      isFirmwareDifferenceDetected

      FIRMWARE_VERSION

      Access:

      GET

      Type:

      String

      API:

      -

      LEVEL_1_CELL_VOLTAGE_THRESHOLD

      Access:

      SET, GET

      Type:

      Integer

      API:

      setLevel1CellVoltageThreshold

      getLevel1CellVoltageThreshold

      IS_BEING_CHARGED

      Access:

      PUSH

      Type:

      Boolean

      API:

      isBeingCharged

      IS_ANY_BATTERY_DISCONNECTED

      Access:

      GET

      Type:

      Boolean

      API:

      isAnyBatteryDisconnected

      IS_VOLTAGE_DIFFERENCE_DETECTED

      Access:

      GET

      Type:

      Boolean

      API:

      isVoltageDifferenceDetected