java.lang.Object | |
↳ | com.datalogic.extension.selfshopping.power.SelfshoppingBatteryManager |
The Battery Manager used in the Selfshopping Extension SDK. It allows to read specific battery parameters related to lifetime, manufacturer information or realtime values. This class is also used to setup the current charging profile between the ones available.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACTION_LIFETIME_DATA_CHANGED | Action for a sticky broadcast containing health information about the battery. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_CAPACITY | Charging profile on the Joya Touch device with capacity only preference. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_CAPACITY_LIFETIME | Charging profile on the Joya Touch device with capacity and lifetime preference. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_CHARGING_SPEED | Charging profile on the Joya Touch device with charging speed only preference. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_CHARGING_SPEED_CAPACITY | Charging profile on the Joya Touch device with charging speed and capacity preference. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_CHARGING_SPEED_LIFETIME | Charging profile on the Joya Touch device with charging speed and lifetime preference. | |||||||||
int | CHARGING_PROFILE_JOYA_TOUCH_LIFETIME | Charging profile on the Joya Touch device with lifetime only preference. | |||||||||
String | EXTRA_LIFETIME_CAPACITY_FULL | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the full battery capacity in mAh. |
|||||||||
String | EXTRA_LIFETIME_CAPACITY_REMAINING | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the remaining battery capacity in mAh. |
|||||||||
String | EXTRA_LIFETIME_CHARGE_CURRENT_MAX | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the maximum charge current reached by the battery during its life
(in mA). |
|||||||||
String | EXTRA_LIFETIME_DISCHARGE_CURRENT_MAX | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the maximum discharge current reached by the battery during its life
(in mA). |
|||||||||
String | EXTRA_LIFETIME_STATE_OF_HEALTH | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the current state of health in percentage. |
|||||||||
String | EXTRA_LIFETIME_TEMPERATURE_MAX | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the maximum temperature reached by the battery during its life
(in 0.1 °C). |
|||||||||
String | EXTRA_LIFETIME_TEMPERATURE_MIN | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the minimum temperature reached by the battery during its life
(in 0.1 °C). |
|||||||||
String | EXTRA_LIFETIME_TOTAL_DISCHARGE | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the amount of discharge (in 0.1 Ah) taken by the battery during its
life. |
|||||||||
String | EXTRA_LIFETIME_VOLTAGE_MAX | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the maximum voltage reached by the battery during its life (in mV). |
|||||||||
String | EXTRA_LIFETIME_VOLTAGE_MIN | Extra for ACTION_LIFETIME_DATA_CHANGED : integer containing
the minimum voltage reached by the battery during its life (in mV). |
|||||||||
int | PROPERTY_TIME_TO_EMPTY | Integer property representing the estimated remaining battery life (in seconds). |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the current charging profile setup in this device.
| |||||||||||
Returns an instance of the
SelfshoppingBatteryManager . | |||||||||||
Reads a specific integer value given its ID.
| |||||||||||
Reads the battery manufacturer info.
| |||||||||||
Gets the supported charging profiles in this device.
| |||||||||||
Sets the current charging profile.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Action for a sticky broadcast containing health information about
the battery. All intent extras are documented in the
SelfshoppingBatteryManager
class.
Charging profile on the Joya Touch device with capacity only preference.
Charging profile on the Joya Touch device with capacity and lifetime preference.
Charging profile on the Joya Touch device with charging speed only preference.
Charging profile on the Joya Touch device with charging speed and capacity preference.
Charging profile on the Joya Touch device with charging speed and lifetime preference.
Charging profile on the Joya Touch device with lifetime only preference.
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the full battery capacity in mAh.
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the remaining battery capacity in mAh.
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the maximum charge current reached by the battery during its life
(in mA).
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the maximum discharge current reached by the battery during its life
(in mA).
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the current state of health in percentage.
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the maximum temperature reached by the battery during its life
(in 0.1 °C).
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the minimum temperature reached by the battery during its life
(in 0.1 °C).
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the amount of discharge (in 0.1 Ah) taken by the battery during its
life.
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the maximum voltage reached by the battery during its life (in mV).
Extra for ACTION_LIFETIME_DATA_CHANGED
: integer containing
the minimum voltage reached by the battery during its life (in mV).
Integer property representing the estimated remaining battery life (in seconds).
Gets the current charging profile setup in this device.
ChargingProfile
currently setup in this device.
Returns an instance of the SelfshoppingBatteryManager
.
Reads a specific integer value given its ID. This value is present
as one of the properties of the SelfshoppingBatteryManager
and it must be positive.
id | The property ID (needs to be one of the supported). |
---|
int
The value of the specified property, or throws an
Exception
in case of failure.
Reads the battery manufacturer info.
ManufacturerInfo
object containing all battery manufacturer info.
Gets the supported charging profiles in this device. You can use one of the returning objects to setup the desired charging profile.
ChargingProfile
objects, each representing one of the supported charging profile.
The list can be empty in case no charging profile is supported in the
current device.
Sets the current charging profile. This setting is persistent to device reboots or even factory resets.
chargingProfile | The ChargingProfile
to set.
|
---|