Class ENManager

  • All Implemented Interfaces:
    NSObject

    public class ENManager
    extends NSObject
    =========================================================================================================================== Manages Exposure Notification functionality. API-Since: 12.5
    • Constructor Detail

      • ENManager

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • activateWithCompletionHandler

        public void activateWithCompletionHandler​(@NotNull
                                                  @NotNull ENManager.Block_activateWithCompletionHandler completionHandler)
        Activates the object to prepare it for use. Properties may not be usable until the completion handler reports success.
      • activityHandler

        @Nullable
        public @Nullable ENManager.Block_activityHandler_ret activityHandler()
        Invoked when the app is launched for an activity while it might not be running. When the app is launched, it should create an ENManager instance, set this handler, and then activate the manager. API-Since: 12.5
      • allocWithZone

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

        public static long authorizationStatus()
        Reports the current authorization status of the app. Apps can use this property to preflight authorization in order to determine if the user will be prompted.
      • 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()
      • detectExposuresWithConfigurationCompletionHandler

        @NotNull
        public @NotNull NSProgress detectExposuresWithConfigurationCompletionHandler​(@NotNull
                                                                                     @NotNull ENExposureConfiguration configuration,
                                                                                     @NotNull
                                                                                     @NotNull ENManager.Block_detectExposuresWithConfigurationCompletionHandler completionHandler)
        Detects exposures using the specified configuration to control the scoring algorithm. This uses the diagnosis keys already known to the system. Only available to apps with ENAPIVersion 2 or higher. API-Since: 12.5
      • detectExposuresWithConfigurationDiagnosisKeyURLsCompletionHandler

        @NotNull
        public @NotNull NSProgress detectExposuresWithConfigurationDiagnosisKeyURLsCompletionHandler​(@NotNull
                                                                                                     @NotNull ENExposureConfiguration configuration,
                                                                                                     @NotNull
                                                                                                     @NotNull NSArray<? extends NSURL> diagnosisKeyURLs,
                                                                                                     @NotNull
                                                                                                     @NotNull ENManager.Block_detectExposuresWithConfigurationDiagnosisKeyURLsCompletionHandler completionHandler)
        Detects exposures using the specified configuration to control the scoring algorithm and URLs to specify the files containing diagnosis keys the app has downloaded. The diagnosis key files must be signed appropriately. When the app's ENAPIVersion is 2 or higher, keys already known to the system are included in the analysis.
      • exposureNotificationEnabled

        public boolean exposureNotificationEnabled()
        Indicates if Exposure Notification is enabled on the system. KVO may be used to monitor for changes. This will be NO until activateWithCompletionHandler has completed successfully. Note that even if it's enabled, it may be inactive for other reasons, such as Bluetooth being turned off. The exposureNotificationStatus property can be monitored for the overall status of Exposure Notification.
      • exposureNotificationStatus

        public long exposureNotificationStatus()
        Overall status of Exposure Notification. KVO may be used to monitor for changes.
      • getDiagnosisKeysWithCompletionHandler

        public void getDiagnosisKeysWithCompletionHandler​(@NotNull
                                                          @NotNull ENManager.Block_getDiagnosisKeysWithCompletionHandler completionHandler)
        Requests the temporary exposure keys used by this device to share with a server. Each use of this API will present the user with system UI to authorize it.
      • getExposureInfoFromSummaryUserExplanationCompletionHandler

        @NotNull
        @Deprecated
        public @NotNull NSProgress getExposureInfoFromSummaryUserExplanationCompletionHandler​(@NotNull
                                                                                              @NotNull ENExposureDetectionSummary summary,
                                                                                              @NotNull
                                                                                              @NotNull java.lang.String userExplanation,
                                                                                              @NotNull
                                                                                              @NotNull ENManager.Block_getExposureInfoFromSummaryUserExplanationCompletionHandler completionHandler)
        Deprecated.
        Gets info about each exposure from the summary provided when exposure detection completes. Using this API will inform the user that their exposure details have been revealed to the app. The user explanation string will be displayed as part of the UI to inform the user of using this API. API-Since: 13.5 Deprecated-Since: 13.6 Deprecated-Message: Use getExposureWindowsFromSummary, if needed.
      • getTestDiagnosisKeysWithCompletionHandler

        public void getTestDiagnosisKeysWithCompletionHandler​(@NotNull
                                                              @NotNull ENManager.Block_getTestDiagnosisKeysWithCompletionHandler completionHandler)
        Requests the temporary exposure keys, including the current key, used by this device for testing. Each use of this API will present the user with system UI to authorize it. WARNING: This API is only for use by developers. It requires a special entitlement that is not allowed in the app store. It's only intended to allow developers to test without needing to wait 24 hours for a key to be released.
      • getUserTraveledWithCompletionHandler

        public void getUserTraveledWithCompletionHandler​(@NotNull
                                                         @NotNull ENManager.Block_getUserTraveledWithCompletionHandler completionHandler)
        Reports if the user traveled within an exposure period (e.g. 14 days). API-Since: 12.5
      • 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()
        Stops any outstanding operations and invalidates this object. Once this is called, the object can no longer be used. To start using ENManager again, a new instance of the class must be created and activated.
      • invalidationHandler

        @Nullable
        public @Nullable ENManager.Block_invalidationHandler_ret invalidationHandler()
        Invoked exactly once when invalidation completes. This property is cleared before it's invoked to break retain cycles.
      • 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)
      • new_objc

        public static ENManager new_objc()
      • preAuthorizeDiagnosisKeysWithCompletionHandler

        public void preAuthorizeDiagnosisKeysWithCompletionHandler​(@NotNull
                                                                   @NotNull ENManager.Block_preAuthorizeDiagnosisKeysWithCompletionHandler completionHandler)
        Authorizes a one-time, future release of diagnosis keys without a user prompt at the time of release. This allows the user to authorize ahead of time in case they are unable to approve at the time of positive diagnosis. WARNING: Application should be in foreground to request the authorization API-Since: 14.4
      • requestPreAuthorizedDiagnosisKeysWithCompletionHandler

        public void requestPreAuthorizedDiagnosisKeysWithCompletionHandler​(@NotNull
                                                                           @NotNull ENManager.Block_requestPreAuthorizedDiagnosisKeysWithCompletionHandler completionHandler)
        Requests diagnosis keys after previously using preAuthorizeDiagnosisKeys successfully. This will display a notification to the user for the user to know the keys will be returned. Keys are returned by invoking diagnosisKeysAvailable, which must be set before calling this. API-Since: 14.4
      • resolveClassMethod

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

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

        public void setActivityHandler​(@Nullable
                                       @Nullable ENManager.Block_setActivityHandler value)
        Invoked when the app is launched for an activity while it might not be running. When the app is launched, it should create an ENManager instance, set this handler, and then activate the manager. API-Since: 12.5
      • setDiagnosisKeysAvailableHandler

        public void setDiagnosisKeysAvailableHandler​(@Nullable
                                                     @Nullable ENManager.Block_setDiagnosisKeysAvailableHandler value)
        Invoked after requestPreAuthorizedDiagnosisKeys if user authorization is still valid. API-Since: 14.4
      • setExposureNotificationEnabledCompletionHandler

        public void setExposureNotificationEnabledCompletionHandler​(boolean enabled,
                                                                    @NotNull
                                                                    @NotNull ENManager.Block_setExposureNotificationEnabledCompletionHandler completionHandler)
        Enables or disables Exposure Notification. If not previously authorized, this shows a user dialog for consent to enable Exposure Notification. Note: Disabling stops Bluetooth advertising and scanning related to Exposure Notification, but the Diagnosis Keys and data will remain.
      • setInvalidationHandler

        public void setInvalidationHandler​(@Nullable
                                           @Nullable ENManager.Block_setInvalidationHandler value)
        Invoked exactly once when invalidation completes. This property is cleared before it's invoked to break retain cycles.
      • 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()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.