PolarH10OfflineExerciseApi
public protocol PolarH10OfflineExerciseApi
H10 Exercise recording API.
H10 Exercise recording makes it possible to record Hr or Rr data to H10 device memory. With H10 Exercise recording the H10 and phone don’t need to be connected all the time, as H10 exercise recording continues in Polar device even the BLE disconnects.
Requires features PolarBleSdkFeature.feature_polar_h10_exercise_recording
Note, API is working only with Polar H10 device
-
Request start recording. Supported only by Polar H10. Requires
polarFileTransferfeature.Declaration
Swift
func startRecording(_ identifier: String, exerciseId: String, interval: RecordingInterval, sampleType: SampleType) -> CompletableParameters
identifierPolar device id or UUID
exerciseIdunique identifier for for exercise entry length from 1-64 bytes
intervalrecording interval to be used. Has no effect if
sampleTypeisSampleType.rrsampleTypesample type to be used.
Return Value
Completable stream
- success: recording started
- onError: see
PolarErrorsfor possible errors invoked
-
Request stop for current recording. Supported only by Polar H10. Requires
polarFileTransferfeature.Declaration
Swift
func stopRecording(_ identifier: String) -> CompletableParameters
identifierPolar device id or UUID
Return Value
Completable stream
- success: recording stopped
- onError: see
PolarErrorsfor possible errors invoked
-
Request current recording status. Supported only by Polar H10. Requires
polarFileTransferfeature.Declaration
Swift
func requestRecordingStatus(_ identifier: String) -> Single<PolarRecordingStatus>Parameters
identifierPolar device id
Return Value
Single stream
- success: see
PolarRecordingStatus - onError: see
PolarErrorsfor possible errors invoked
- success: see
-
Api for fetching stored exercises list from Polar H10 device. Requires
polarFileTransferfeature. This API is working for Polar OH1 and Polar Verity Sense devices too, however in those devices recording of exercise requires that sensor is registered to Polar Flow account.Declaration
Swift
func fetchStoredExerciseList(_ identifier: String) -> Observable<PolarExerciseEntry>Parameters
identifierPolar device id or device address
Return Value
Observable stream
- onNext: see
PolarExerciseEntry - onError: see
PolarErrorsfor possible errors invoked
- onNext: see
-
Api for fetching a single exercise from Polar H10 device. Requires
polarFileTransferfeature. This API is working for Polar OH1 and Polar Verity Sense devices too, however in those devices recording of exercise requires that sensor is registered to Polar Flow account.Declaration
Swift
func fetchExercise(_ identifier: String, entry: PolarExerciseEntry) -> Single<PolarExerciseData>Parameters
identifierPolar device id or device address
entrysingle exercise entry to be fetched
Return Value
Single stream
- success: invoked after exercise data has been fetched from the device. see
PolarExerciseEntry - onError: see
PolarErrorsfor possible errors invoked
- success: invoked after exercise data has been fetched from the device. see
-
Api for removing single exercise from Polar H10 device. Requires
polarFileTransferfeature. This API is working for Polar OH1 and Polar Verity Sense devices too, however in those devices recording of exercise requires that sensor is registered to Polar Flow account.Declaration
Swift
func removeExercise(_ identifier: String, entry: PolarExerciseEntry) -> CompletableParameters
identifierPolar device id or device address
entrysingle exercise entry to be removed
Return Value
Completable stream
- complete: entry successfully removed
- onError: see
PolarErrorsfor possible errors invoked