Interface AdblockWebView.EventsListener

Enclosing class:
AdblockWebView

public static interface AdblockWebView.EventsListener
Listener for ad blocking related events. However, this interface may not be in use if Adblock Plus is disabled.
  • Method Details

    • onNavigation

      void onNavigation()
      "Navigation" event. This method is called when the current instance of WebView begins loading of a new page. It corresponds to `onPageStarted` of `WebViewClient` and is called on the UI thread.
    • onResourceLoadingBlocked

      void onResourceLoadingBlocked​(AdblockWebView.EventsListener.BlockedResourceInfo info)
      "Resource loading blocked" event. This method can be called on a background thread. It should not block the thread for too long as it slows down resource loading.
      Parameters:
      info - contains auxiliary information about a blocked resource.
    • onResourceLoadingAllowlisted

      void onResourceLoadingAllowlisted​(AdblockWebView.EventsListener.AllowlistedResourceInfo info)
      "Resource loading allowlisted" event. This method can be called on a background thread. It should not block the thread for too long as it slows down resource loading.
      Parameters:
      info - contains auxiliary information about a blocked resource.