Interface PolarSleepApi

  • All Implemented Interfaces:

    
    public interface PolarSleepApi
    
                        

    Polar sleep API. Requires features FEATURE_POLAR_SLEEP_DATA, FEATURE_POLAR_FILE_TRANSFER

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • getSleepRecordingState

         abstract Single<Boolean> getSleepRecordingState(String identifier)

        Get sleep recording state

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

        A Single boolean value indicating if sleep recording is ongoing

      • observeSleepRecordingState

         abstract Flowable<BooleanArray> observeSleepRecordingState(String identifier)

        Observe sleep recording state

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

        Flowable of boolean values indicating if sleep recording is ongoing

      • stopSleepRecording

         abstract Completable stopSleepRecording(String identifier)

        Stop sleep recording

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

        Completable success when sleep recording stop action has been succesfully sent to device

      • getSleep

         abstract Single<List<PolarSleepData>> getSleep(String identifier, LocalDate fromDate, LocalDate toDate)

        Get sleep stages and duration for a given period.

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

        A Single emitting a list of PolarSleepData representing the sleep data for the specified period.