Class UNUserNotificationCenter

  • All Implemented Interfaces:
    NSObject

    public class UNUserNotificationCenter
    extends NSObject
    UNNotificationRequests can be scheduled using UNUserNotificationCenter. They can also be sent to the device from a server using Apple Push Notification Service. If the application is authorized then the UNNotificationRequest will be used to create a UNNotification and it will be used to notify the user. If the user acts on the UNNotification then a UNNotificationResponse will be sent to the application. API-Since: 10.0
    • Constructor Detail

      • UNUserNotificationCenter

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • currentNotificationCenter

        @NotNull
        public static @NotNull UNUserNotificationCenter currentNotificationCenter()
        The UNUserNotificationCenter for the current application
      • debugDescription_static

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

        public static java.lang.String description_static()
      • 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)
      • 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)
      • resolveClassMethod

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

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • 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()
      • addNotificationRequestWithCompletionHandler

        public void addNotificationRequestWithCompletionHandler​(@NotNull
                                                                @NotNull UNNotificationRequest request,
                                                                @Nullable
                                                                @Nullable UNUserNotificationCenter.Block_addNotificationRequestWithCompletionHandler completionHandler)
        Notification requests can be scheduled to notify the user via time and location. See UNNotificationTrigger for more information. Calling -addNotificationRequest: will replace an existing notification request with the same identifier. A notification request with the identifier as an existing delivered notifications will alert for the new notification request and replace the existing delivered notification when it is triggered. The number of pending notification requests that may be scheduled by an application at any one time is limited by the system.
      • removeAllDeliveredNotifications

        public void removeAllDeliveredNotifications()
      • removeAllPendingNotificationRequests

        public void removeAllPendingNotificationRequests()
      • removeDeliveredNotificationsWithIdentifiers

        public void removeDeliveredNotificationsWithIdentifiers​(@NotNull
                                                                @NotNull NSArray<java.lang.String> identifiers)
      • removePendingNotificationRequestsWithIdentifiers

        public void removePendingNotificationRequestsWithIdentifiers​(@NotNull
                                                                     @NotNull NSArray<java.lang.String> identifiers)
        Removes notifications that have been scheduled for a future time or location and are waiting for their trigger to fire. There is no reason to call these methods to remove push notifications or notification requests with no trigger.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable UNUserNotificationCenterDelegate value)
        The delegate can only be set from an application
      • setNotificationCategories

        public void setNotificationCategories​(@NotNull
                                              @NotNull NSSet<? extends UNNotificationCategory> categories)
        Notification categories can be used to choose which actions will be displayed on which notifications.
      • supportsContentExtensions

        public boolean supportsContentExtensions()
        Returns YES if the current device supports content extensions
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.