PolarBleApiDeviceFeaturesObserver
public protocol PolarBleApiDeviceFeaturesObserver : AnyObject
Data client observer
-
The feature is available in this device and it is ready to use. Called only for the features which are specified in [PolarBleApi] construction. SDK calls this method after device is connected. When this call back is received, device should be ready to perform methods that depend on indicated feature.
Requires
Requires SDK feature(s): None (observer callback).
Declaration
Swift
func bleSdkFeatureReady(_ identifier: String, feature: PolarBleSdkFeature)Parameters
identifierPolar device id
featurethe feature that is now ready for use
-
bleSdkFeaturesReadiness(_:Default implementationready: unavailable: ) All features that are listed in [PolarBleApi] construction and are supported by this device are ready. Constructing with an empty feature set causes SDK to enable all SDK features by default. SDK calls this method after a device is connected.
This is the simplest way to wait for device to become ready for further operations.
The
readylist contains features that are confirmed ready for use. Theunavailablelist 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 viableSdkFeatureReady.Requires
Requires SDK feature(s): None (observer callback).
Default Implementation
Declaration
Swift
func bleSdkFeaturesReadiness(_ identifier: String, ready: [PolarBleSdkFeature], unavailable: [PolarBleSdkFeature])Parameters
identifierPolar device id
readyfeatures that are confirmed ready for use on this device
unavailablefeatures that are not supported by this device