Handles H5 ad requests.
If using aWebView
,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(String)
.
Public Constructor Summary
H5AdsRequestHandler(Context
context,OnH5AdsEventListener
onH5AdsEventListener)
Constructs an
H5AdsRequestHandler .
|
Public Method Summary
void |
clearAdObjects()
Destroys all ads being managed by H5 ads.
|
boolean | |
boolean |
Inherited Method Summary
Public Constructors
publicH5AdsRequestHandler(Contextcontext, OnH5AdsEventListener onH5AdsEventListener)
Constructs anH5AdsRequestHandler
.
Public Methods
public voidclearAdObjects()
Destroys all ads being managed by H5 ads.
Note: This method has no effect on any ads instantiated by non-H5 APIs, such as
InterstitialAd
andRewardedAd
.
public booleanhandleH5AdsRequest(Stringurl)
Attempts to handle an H5 ads request.
Returns
- true if the request was an H5 ads request, false otherwise.
public booleanshouldInterceptRequest(Stringurl)
Returns true if request is for H5 ads, false otherwise.