DLBatteryManagerAddBatteryEventListener Method |
Namespace: Com.Datalogic.Device.Battery
Exception | Condition |
---|---|
BatteryException | - in case of error, when exceptions are enabled through the ErrorManager singleton. |
Registers a IBatteryEventListener
to be notified of the BatteryManager events.
A call to addBatteryEventListener will fail with error ContextUnknown
if [!:Com.Datalogic.Device.Battery.DLBatteryManager.initBatteryEvents(Context)]
has not been not previously called to register the client's context.
Call RemoveBatteryEventListener(IBatteryEventListener)
before the application closes to properly shut down the listener and avoid memory leaks.