Class NISession

  • All Implemented Interfaces:
    NSObject

    public class NISession
    extends NSObject
    Nearby interaction session. API-Since: 14.0
    • Constructor Detail

      • NISession

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NISession allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • 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()
      • configuration

        @Nullable
        public @Nullable NIConfiguration configuration()
        The nearby interaction configuration currently being used by the session.
      • debugDescription_static

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

        @Nullable
        public @Nullable NISessionDelegate delegate()
        A delegate for receiving NISession updates.
      • delegateQueue

        @Nullable
        public @Nullable dispatch_queue_t delegateQueue()
        The dispatch queue on which the delegate calls are performed. If not provided or nil, delegate calls will be performed on the main queue.
      • description_static

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

        @Nullable
        public @Nullable NIDiscoveryToken discoveryToken()
        A unique nearby interaction identifier for this session. Copy this discoveryToken and share it with a peer device. The discoveryToken is unique to this device and this session.
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

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

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

        public void invalidate()
        Invalidate an ongoing nearby interaction session. Invalidate sessions you wish to terminate and do not intend to restart. A peer device in a nearby interaction session will receive a callback to -didRemoveNearbyObject:withReason: some time after a call to invalidate (see NINearbyObjectRemovalReason). calling -runWithConfiguration: after invalidation will result in an error.
      • isSubclassOfClass

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

        @Deprecated
        public static boolean isSupported()
        Deprecated.
        Whether or not this device is capable of participating in a nearby interaction session. API-Since: 14.0 Deprecated-Since: 16.0
      • keyPathsForValuesAffectingValueForKey

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

        public static NISession new_objc()
      • pause

        public void pause()
        Pause an ongoing nearby interaction session. Paused sessions may be restarted by calling -runWithConfiguration:. The same local discoveryToken will be used.
      • resolveClassMethod

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

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

        public void runWithConfiguration​(@NotNull
                                         @NotNull NIConfiguration configuration)
        Start a nearby interaction session.
        Parameters:
        configuration - Nearby interaction configuration for this session. Both devices must call -runWithConfiguration: with a valid configuration identifying the other device in order to receive nearby object updates.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable NISessionDelegate value)
        A delegate for receiving NISession updates.
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable NISessionDelegate value)
        A delegate for receiving NISession updates.
      • setDelegateQueue

        public void setDelegateQueue​(@Nullable
                                     @Nullable dispatch_queue_t value)
        The dispatch queue on which the delegate calls are performed. If not provided or nil, delegate calls will be performed on the main queue.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • deviceCapabilities

        @NotNull
        public static @NotNull NIDeviceCapability deviceCapabilities()
        Get the protocol that describes nearby interaction capabilities on this device. Detailed description on the capability protocol is in NIDeviceCapability.h. API-Since: 16.0
      • setARSession

        public void setARSession​(@NotNull
                                 @NotNull ARSession session)
        Provide an ARSession object for use with the NISession If not provided, an ARSession will be created automatically if the cameraAssistanceEnabled property on the configuration is YES The developer is responsible for running the ARSession if provided. If the ARConfiguration used to run the session is not compatible with the NISession, the NISession will invalidate with error If the platform does not support camera assistance or an ARSession is provided without enabling cameraAssistanceEnabled property in the NIConfiguration, the NISession will invalidate with error (see NIError.h) API-Since: 16.0
        Parameters:
        session - The ARSession to use for camera assistance
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.