Class SRSensorReader

  • All Implemented Interfaces:
    NSObject

    public class SRSensorReader
    extends NSObject
    API-Since: 14.0
    • Constructor Detail

      • SRSensorReader

        protected SRSensorReader​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static SRSensorReader allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • authorizationStatus

        public long authorizationStatus()
        The current authorization status of the calling application.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • fetch

        public void fetch​(@NotNull
                          @NotNull SRFetchRequest request)
        Fetches samples for the reader's sensor for given request parameters The reader must be authorized for the sensor for this to succeed. Samples will be delivered to the delegate through multiple calls to the sensorReader:fetchingRequest:didFetchResult: delegate method In the case of a failure, any error will be delivered to the delegate in the sensorReader:fetchingRequest:failedWithError: method. In the case of success, completion notification will be delivered to the delegate in the sensorReader:didCompleteFetch: method.
        Parameters:
        request - The query parameters for this fetch
      • fetchDevices

        public void fetchDevices()
        Fetches device information for all devices that have stored data for the given sensor in SensorKit If the request completes successfully, devices will be returned to the delegate in the sensorReader:fetchedDevices: callback. If the request failed, an error will be returned to the delegate in the sensorReader:fetchDevicesFailedWithError: method
      • hash_static

        public static long hash_static()
      • initWithSensor

        public SRSensorReader initWithSensor​(@NotNull
                                             @NotNull java.lang.String sensor)
        Initializes an SRSensorReader that will fetch data for the current device and any companion
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • requestAuthorizationForSensorsCompletion

        public static void requestAuthorizationForSensorsCompletion​(@NotNull
                                                                    @NotNull NSSet<java.lang.String> sensors,
                                                                    @NotNull
                                                                    @NotNull SRSensorReader.Block_requestAuthorizationForSensorsCompletion completion)
        Request authorization to a given set of sensors If the SRSensorReader instance is not authorized, this method must be called before any other methods. Failure to request authorization will cause errors to be returned from the other methods. When SensorKit prepares the prompt for display, it will look at the NSSensorKitUsageDetail key in your Info.plist. The value should be a dictionary containing usage descriptions for all of the sensors being requested. The description key you provide to this method must correspond to an entry in that dictionary. To retrieve a localized string, SensorKit will load your InfoPlist.strings file and try to look up a string using the description key you provided. If that fails, SensorKit will use the content provided in your Info.plist. SensorKit may decide against showing the user a prompt. For example, if the user has already chosen whether to grant the application access to all of the types provided. When that happens, your completion block will be called with an appropriate NSError. If the user responded to the prompt, your completion block will be called with a nil error. Changes in authorization status will delivered to the delegate in the sensorReader:didChangeAuthorizationStatus: method.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • sensor

        @NotNull
        public @NotNull java.lang.String sensor()
        the sensor this reader was initialized with
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • startRecording

        public void startRecording()
        Starts recording for the reader's sensor The reader must be authorized for the sensor for this to succeed. This starts recording on this device and any paired devices. If other readers have already started the sensor recording this reader's interest in recording will be maintained. Other readers in other apps for the same sensor will not affect the recording status of this reader. In the case of success, completion notification will be delivered to the delegate in the sensorReaderWillStartRecording: delegate method. In the case of failure, error notification will be delivered to the delegate in the sensorReader:startRecordingFailedWithError: delegate method.
      • stopRecording

        public void stopRecording()
        Stops recording for the reader's sensor The reader must be authorized for the sensor for this to succeed. This stops recording on this device and any paired devices. Sensor recording will continue until the last interested reader has stopped recording. In the case of success, completion notification will be delivered to the delegate in the sensorReaderDidStopRecording: delegate method. In the case of failure, error notification will be delivered to the delegate in the sensorReader:stopRecordingFailedWithError: delegate method.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.