def cancel_notification(cls, notification_or_id, tag=None):
        """ Cancel the notification.
         
        Parameters
        ----------
        notification_or_id: Notification.Builder or int
            The notification or id of a notification to clear
        tag: String
            The tag of the notification to clear
        
        """
        def on_ready(mgr):
            if isinstance(notification_or_id, JavaBridgeObject):
                nid = notification_or_id.__id__
            else:
                nid = notification_or_id
            if tag is None:
                mgr.cancel_(nid)
            else:
                mgr.cancel(tag, nid)
        cls.get().then(on_ready)