H5AdsRequestHandler

public final class H5AdsRequestHandler


Handles H5 ad requests.

If using a android.webkit.WebView, use H5AdsWebViewClient instead of this class.

Otherwise, if using an alternative web view, create an instance of this class, and pass every web request to handleH5AdsRequest.

Summary

Public constructors

H5AdsRequestHandler(
    Context context,
    OnH5AdsEventListener onH5AdsEventListener
)

Constructs an H5AdsRequestHandler.

Public methods

void

Destroys all ads being managed by H5 ads.

boolean

Attempts to handle an H5 ads request.

boolean

Returns true if request is for H5 ads, false otherwise.

Public constructors

H5AdsRequestHandler

public H5AdsRequestHandler(
    Context context,
    OnH5AdsEventListener onH5AdsEventListener
)

Constructs an H5AdsRequestHandler.

Public methods

clearAdObjects

public void clearAdObjects()

Destroys all ads being managed by H5 ads.

Note: This method has no effect on any ads instantiated by non-H5 APIs, such as and .

handleH5AdsRequest

public boolean handleH5AdsRequest(String url)

Attempts to handle an H5 ads request.

Returns
boolean

true if the request was an H5 ads request, false otherwise.

shouldInterceptRequest

public boolean shouldInterceptRequest(String url)

Returns true if request is for H5 ads, false otherwise.