com.ugrokit.api.Ugi.ReportConnectionStateAndBatteryInfoPeriodicallyCallback Interface Reference

Overview

Callback interface for completion for reportConnectionStateAndBatteryInfoPeriodically()

Public Member Functions

void exec (ConnectionStates connectionState, OngoingOperations ongoingOperation, boolean batteryInformationIsValid, boolean externalPowerIsConnected, boolean isCharging, boolean canScan, boolean canGetBatteryWhileScanning, boolean temperatureAtOrAboveThreshold, boolean temperatureWithin5DegreesOfThreshold, boolean temperatureWithin10DegreesOfThreshold, boolean temperatureWithin20DegreesOfThreshold, int averagedBatteryPercentage, String statusDescription)
 Callback with connection and battery information. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.ReportConnectionStateAndBatteryInfoPeriodicallyCallback.exec ( ConnectionStates  connectionState,
OngoingOperations  ongoingOperation,
boolean  batteryInformationIsValid,
boolean  externalPowerIsConnected,
boolean  isCharging,
boolean  canScan,
boolean  canGetBatteryWhileScanning,
boolean  temperatureAtOrAboveThreshold,
boolean  temperatureWithin5DegreesOfThreshold,
boolean  temperatureWithin10DegreesOfThreshold,
boolean  temperatureWithin20DegreesOfThreshold,
int  averagedBatteryPercentage,
String  statusDescription 
)

Callback with connection and battery information.

Parameters
connectionStateConnection state
ongoingOperationOngoing operation
batteryInformationIsValidtrue if externalPowerIsConnected, isCharging, canScan and averagedBatteryPercentage are valid
externalPowerIsConnectedtrue if external power is connected
isChargingtrue if battery is charging
canScantrue if battery is capable of scanning
canGetBatteryWhileScanningtrue if this Grokker can return battery information while scanning (firmware 1.11.2 or above)
temperatureAtOrAboveThresholdtrue if temperature is at or above the threshold for scanning
temperatureWithin5DegreesOfThresholdtrue if temperature is within 5 degrees C of the threshold for scanning
temperatureWithin10DegreesOfThresholdtrue if temperature is within 10 degrees C of the threshold for scanning
temperatureWithin20DegreesOfThresholdtrue if temperature is within 20 degrees C of the threshold for scanning
averagedBatteryPercentageBattery percentage averaged over a short period, so more stable, -1 if not valid. Only valid if external power is not connected
statusDescriptionText description