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 polarFileTransfer feature.

    Declaration

    Swift

    func startRecording(_ identifier: String, exerciseId: String, interval: RecordingInterval, sampleType: SampleType) -> Completable

    Parameters

    identifier

    Polar device id or UUID

    exerciseId

    unique identifier for for exercise entry length from 1-64 bytes

    interval

    recording interval to be used. Has no effect if sampleType is SampleType.rr

    sampleType

    sample type to be used.

    Return Value

    Completable stream

    • success: recording started
    • onError: see PolarErrors for possible errors invoked

  • Request stop for current recording. Supported only by Polar H10. Requires polarFileTransfer feature.

    Declaration

    Swift

    func stopRecording(_ identifier: String) -> Completable

    Parameters

    identifier

    Polar device id or UUID

    Return Value

    Completable stream

    • success: recording stopped
    • onError: see PolarErrors for possible errors invoked

  • Request current recording status. Supported only by Polar H10. Requires polarFileTransfer feature.

    Declaration

    Swift

    func requestRecordingStatus(_ identifier: String) -> Single<PolarRecordingStatus>

    Parameters

    identifier

    Polar device id

    Return Value

    Single stream

  • Api for fetching stored exercises list from Polar H10 device. Requires polarFileTransfer feature. 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

    identifier

    Polar device id or device address

    Return Value

    Observable stream

  • Api for fetching a single exercise from Polar H10 device. Requires polarFileTransfer feature. 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

    identifier

    Polar device id or device address

    entry

    single exercise entry to be fetched

    Return Value

    Single stream

    • success: invoked after exercise data has been fetched from the device. see PolarExerciseEntry
    • onError: see PolarErrors for possible errors invoked

  • Api for removing single exercise from Polar H10 device. Requires polarFileTransfer feature. 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) -> Completable

    Parameters

    identifier

    Polar device id or device address

    entry

    single exercise entry to be removed

    Return Value

    Completable stream

    • complete: entry successfully removed
    • onError: see PolarErrors for possible errors invoked