Interface PolarBleApiCallbackProvider
-
- All Implemented Interfaces:
public interface PolarBleApiCallbackProviderContains the callbacks of the API.
-
-
Method Summary
Modifier and Type Method Description abstract UnitblePowerStateChanged(Boolean powered)Bluetooth power state of the device where this SDK is running abstract UnitdeviceConnected(PolarDeviceInfo polarDeviceInfo)Device is now connected abstract UnitdeviceConnecting(PolarDeviceInfo polarDeviceInfo)Connecting to device abstract UnitdeviceDisconnected(PolarDeviceInfo polarDeviceInfo)Device is now disconnected abstract UnitbleSdkFeatureReady(String identifier, PolarBleApi.PolarBleSdkFeature feature)The feature is available in this device and it is ready. abstract UnitbleSdkFeaturesReadiness(String identifier, List<PolarBleApi.PolarBleSdkFeature> ready, List<PolarBleApi.PolarBleSdkFeature> unavailable)Called once all requested features have been evaluated after a device connection. abstract UnitdisInformationReceived(String identifier, UUID uuid, String value)DIS information received. abstract Unit)>disInformationReceived(String identifier, <Error class: unknown class> disInfo)DIS information received. abstract UnitbatteryLevelReceived(String identifier, Integer level)Battery level received. abstract Unit)>batteryChargingStatusReceived(String identifier, <Error class: unknown class> chargingStatus)Battery charging status received. abstract Unit)>powerSourcesStateReceived(String identifier, <Error class: unknown class> powerSourcesState)Battery power sources state received. abstract UnithrNotificationReceived(String identifier, PolarHrData.PolarHrSample data)HR notification data received from device. abstract UnithtsNotificationReceived(String identifier, PolarHealthThermometerData data)Health Thermometer Service. -
-
Method Detail
-
blePowerStateChanged
abstract Unit blePowerStateChanged(Boolean powered)
Bluetooth power state of the device where this SDK is running
- Parameters:
powered- true = Bluetooth power on, false = Bluetooth power off
-
deviceConnected
abstract Unit deviceConnected(PolarDeviceInfo polarDeviceInfo)
Device is now connected
- Parameters:
polarDeviceInfo- Polar device information
-
deviceConnecting
abstract Unit deviceConnecting(PolarDeviceInfo polarDeviceInfo)
Connecting to device
- Parameters:
polarDeviceInfo- Polar device information
-
deviceDisconnected
abstract Unit deviceDisconnected(PolarDeviceInfo polarDeviceInfo)
Device is now disconnected
- Parameters:
polarDeviceInfo- Polar device information
-
bleSdkFeatureReady
abstract Unit bleSdkFeatureReady(String identifier, PolarBleApi.PolarBleSdkFeature feature)
The feature is available in this device and it is ready. Called only for the features which are specified in PolarBleApi construction.
- Parameters:
identifier- Polar device idfeature- feature is ready
-
bleSdkFeaturesReadiness
abstract Unit bleSdkFeaturesReadiness(String identifier, List<PolarBleApi.PolarBleSdkFeature> ready, List<PolarBleApi.PolarBleSdkFeature> unavailable)
Called once all requested features have been evaluated after a device connection. This is the simplest way to wait for the device to become fully ready for further operations.
Constructing PolarBleApi with an empty feature set causes the SDK to evaluate all SDK features by default. SDK calls this method after a device is connected.
The ready list contains features that are confirmed ready for use. The unavailable list contains features that are not supported by this device. Features absent from both lists timed out before their readiness could be established; they can still become ready later and will be reported via bleSdkFeatureReady.
- Parameters:
identifier- Polar device idready- features that are confirmed ready for use on this deviceunavailable- features that are not supported by this device
-
disInformationReceived
abstract Unit disInformationReceived(String identifier, UUID uuid, String value)
DIS information received. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_DEVICE_INFO
- Parameters:
identifier- Polar device id or bt addressuuid- uuid of dis valuevalue- dis value for uuid
-
disInformationReceived
abstract Unit )>disInformationReceived(String identifier, <Error class: unknown class> disInfo)
DIS information received. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_DEVICE_INFO
- Parameters:
identifier- Polar device id or bt addressdisInfo- DisInfo key-value pair
-
batteryLevelReceived
abstract Unit batteryLevelReceived(String identifier, Integer level)
Battery level received. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_BATTERY_INFO
- Parameters:
identifier- Polar device id or bt addresslevel- battery level (value between 0-100%)
-
batteryChargingStatusReceived
abstract Unit )>batteryChargingStatusReceived(String identifier, <Error class: unknown class> chargingStatus)
Battery charging status received. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_BATTERY_INFO
- Parameters:
identifier- Polar device id or bt addresschargingStatus- Charging status ChargeState
-
powerSourcesStateReceived
abstract Unit )>powerSourcesStateReceived(String identifier, <Error class: unknown class> powerSourcesState)
Battery power sources state received. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_BATTERY_INFO
- Parameters:
identifier- Polar device id or bt addresspowerSourcesState- PowerSourcesState
-
hrNotificationReceived
abstract Unit hrNotificationReceived(String identifier, PolarHrData.PolarHrSample data)
HR notification data received from device. Notice when using OH1 and PPI measurement is started hr received from this callback is 0.
- Parameters:
identifier- Polar device id or bt addressdata- @see polar.com.sdk.api.model.PolarHrData.
-
htsNotificationReceived
abstract Unit htsNotificationReceived(String identifier, PolarHealthThermometerData data)
Health Thermometer Service. Requires feature PolarBleApi.PolarBleSdkFeature.FEATURE_HTS
- Parameters:
identifier- Polar device id or bt addressdata- @see polar.com.sdk.api.model.PolarHealthThermometerData.
-
-
-
-