Interface PolarTrainingSessionApi

    • Constructor Detail

    • Method Detail

      • getTrainingSessionReferences

         abstract Flowable<PolarTrainingSessionReference> getTrainingSessionReferences(String identifier, Date fromDate, Date toDate)

        Get training session references for a given period.

        Parameters:
        identifier - The Polar device ID or BT address.
        fromDate - The starting date of the period to retrieve training session references from.
        toDate - The ending date of the period to retrieve training session references from.
        Returns:

        A Flowable emitting PolarTrainingSessionReference objects representing the training session references for the specified period.

      • deleteTrainingSession

         abstract Completable deleteTrainingSession(String identifier, PolarTrainingSessionReference reference)

        Api for removing single training session from a Polar device. You can get a list of training sessions with getTrainingSessionReferences API.

        Parameters:
        identifier - The Polar device ID or BT address.
        reference - PolarTrainingSessionReference with path in device to the training session to be removed.
        Returns:

        Completable stream

      • startExercise

         abstract Completable startExercise(String identifier, PolarExerciseSession.SportProfile profile)

        Start an exercise session on the device.

        Parameters:
        identifier - The Polar device ID or BT address.
        profile - The sport profile to use for the exercise session.
        Returns:

        A Completable that completes when the command has been delivered to the device.

      • pauseExercise

         abstract Completable pauseExercise(String identifier)

        Pause an ongoing exercise session.

        Parameters:
        identifier - The Polar device ID or BT address.
        Returns:

        A Completable that completes when the command has been delivered to the device.

      • resumeExercise

         abstract Completable resumeExercise(String identifier)

        Resume a paused exercise session.

        Parameters:
        identifier - The Polar device ID or BT address.
        Returns:

        A Completable that completes when the command has been delivered to the device.

      • stopExercise

         abstract Completable stopExercise(String identifier)

        Stop the current exercise session.

        By default, the session is saved on the device.

        Parameters:
        identifier - The Polar device ID or BT address.
        Returns:

        A Completable that completes when the command has been delivered to the device.

      • observeExerciseStatus

         abstract Flowable<PolarExerciseSession.ExerciseInfo> observeExerciseStatus(String identifier)

        Observe exercise session status changes from the device.

        Parameters:
        identifier - The Polar device ID or BT address.
        Returns:

        A Flowable emitting PolarExerciseSession.ExerciseInfo whenever the session status changes. - onNext: emitted when exercise status changes - onError: see PolarErrors for possible errors - onComplete: when the device disconnects or observation is disposed