Interstitial Ads
Methods
FlowerAdsManager.requestAd
The function above allows you to insert interstitial ads.
The parameters are described below:
| Parameter | Type | Description |
|---|---|---|
| adTagUrl | string | Ad tag URL issued by an ad server |
| extraParams | map | Extra information which is agreed upon for targeting (null for no extra information) |
| adTagHeaders | map | (Optional) HTTP header information to be added when requesting an ad |
FlowerAdsManager.stop
This method ends ad playback. There are no parameters.
Work Process
- Insert replacement ads at a correct timing, consulting “Ad UI Declaration”. For interstitial ads, ensure the
AdViewcovers the entire screen. - Implement FlowerAdsManagerListener interface, consulting “Implement an Interface for Receiving Ad Events”.
- Finally, request ads trough FlowerAdsManager.requestAd.
// TODO GUIDE: request ad
// arg0: adTagUrl, url from flower system
// You must file a request to Anypoint Media to receive a adTagUrl.
// arg1: extraParams, values you can provide for targeting
// arg2: adTagHeaders, (Optional) values included in headers for ad request
flowerAdView.adsManager.requestAd(
'https://ad_request',
new Map(),
new Map([['custom-ad-header', 'custom-ad-header-value']])
);