PolarWatchFaceApi
public protocol PolarWatchFaceApi
Polar watch face configuration API.
Allows reading and writing complications configuration on PolarOS-based Polar devices. Complications are configurable UI elements on a watch face (e.g. SpO2, heart rate, steps).
Requires feature PolarBleSdkFeature.feature_polar_watch_faces_configuration.
-
getWatchFaceConfig(_:Asynchronous) Read the current watch face configuration from the device KVS.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_watch_faces_configurationThrows
seePolarErrorsfor possible errorsDeclaration
Swift
func getWatchFaceConfig(_ identifier: String) async throws -> PolarWatchFaceConfigParameters
identifierPolar device ID or BT address.
Return Value
PolarWatchFaceConfigreflecting what is currently on the device, or a config with an empty list if no complications are configured. -
setWatchFaceConfig(_:Asynchronousconfig: ) Set the watch face complications on the device.
Writes the provided complication list to the device KVS watch face configuration.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_watch_faces_configurationThrows
seePolarErrorsfor possible errorsDeclaration
Swift
func setWatchFaceConfig(_ identifier: String, config: PolarWatchFaceConfig) async throwsParameters
identifierPolar device ID or BT address.
configWatch face configuration containing the ordered list of complications to enable.