Interface SRSensorReaderDelegate


  • public interface SRSensorReaderDelegate
    API-Since: 14.0
    • Method Detail

      • sensorReaderDidChangeAuthorizationStatus

        default void sensorReaderDidChangeAuthorizationStatus​(@NotNull
                                                              @NotNull SRSensorReader reader,
                                                              long authorizationStatus)
        Invoked when authorization status has changed
      • sensorReaderDidCompleteFetch

        default void sensorReaderDidCompleteFetch​(@NotNull
                                                  @NotNull SRSensorReader reader,
                                                  @NotNull
                                                  @NotNull SRFetchRequest fetchRequest)
        Invoked when a fetch has been completed successfully
      • sensorReaderDidFetchDevices

        default void sensorReaderDidFetchDevices​(@NotNull
                                                 @NotNull SRSensorReader reader,
                                                 @NotNull
                                                 @NotNull NSArray<? extends SRDevice> devices)
      • sensorReaderFetchDevicesDidFailWithError

        default void sensorReaderFetchDevicesDidFailWithError​(@NotNull
                                                              @NotNull SRSensorReader reader,
                                                              @NotNull
                                                              @NotNull NSError error)
      • sensorReaderFetchingRequestDidFetchResult

        default boolean sensorReaderFetchingRequestDidFetchResult​(@NotNull
                                                                  @NotNull SRSensorReader reader,
                                                                  @NotNull
                                                                  @NotNull SRFetchRequest fetchRequest,
                                                                  @NotNull
                                                                  @NotNull SRFetchResult<?> result)
        Invoked when a sample has been fetched [@description] This callback can be called multiple times when there are multiple results. [@note] The fetchResult is not valid after the callback is complete. If the caller needs to access the result at a later time, it must be copied not merely retained
        Parameters:
        fetchRequest - The request corresponding to the this result
        result - One result of the fetch. The caller is expected to know what type of sample is returned.
        Returns:
        The delegate should return YES if the fetch should continue, NO if the fetch should stop
      • sensorReaderFetchingRequestFailedWithError

        default void sensorReaderFetchingRequestFailedWithError​(@NotNull
                                                                @NotNull SRSensorReader reader,
                                                                @NotNull
                                                                @NotNull SRFetchRequest fetchRequest,
                                                                @NotNull
                                                                @NotNull NSError error)
        Invoked when a fetch has completed with an error
      • sensorReaderStartRecordingFailedWithError

        default void sensorReaderStartRecordingFailedWithError​(@NotNull
                                                               @NotNull SRSensorReader reader,
                                                               @NotNull
                                                               @NotNull NSError error)
        Invoked if there was an error starting recording for a given sensor
      • sensorReaderStopRecordingFailedWithError

        default void sensorReaderStopRecordingFailedWithError​(@NotNull
                                                              @NotNull SRSensorReader reader,
                                                              @NotNull
                                                              @NotNull NSError error)
        Invoked if there was an error starting recording for a given sensor
      • sensorReaderDidStopRecording

        default void sensorReaderDidStopRecording​(@NotNull
                                                  @NotNull SRSensorReader reader)
        Invoked after a SRSensorReader has request that recording be stopped for a sensor
      • sensorReaderWillStartRecording

        default void sensorReaderWillStartRecording​(@NotNull
                                                    @NotNull SRSensorReader reader)
        Invoked after a SRSensorReader has request that recording be started for a sensor