Interface UNNotificationContentExtension


  • public interface UNNotificationContentExtension
    • Method Detail

      • didReceiveNotification

        void didReceiveNotification​(UNNotification notification)
        This will be called to send the notification to be displayed by the extension. If the extension is being displayed and more related notifications arrive (eg. more messages for the same conversation) the same method will be called for each new notification.
      • mediaPause

        default void mediaPause()
      • mediaPlay

        default void mediaPlay()
        Called when the user taps the play or pause button.
      • mediaPlayPauseButtonFrame

        default CGRect mediaPlayPauseButtonFrame()
        Implementing this method and returning a non-empty frame will make the notification draw a button that allows the user to play and pause media content embedded in the notification.
      • mediaPlayPauseButtonTintColor

        default UIColor mediaPlayPauseButtonTintColor()
      • mediaPlayPauseButtonType

        default long mediaPlayPauseButtonType()
        Implementing this method and returning a button type other that "None" will make the notification attempt to draw a play/pause button correctly styled for that type.