Banner Ad
1. Basic Requirements
Add ADX Flutter SDK to your project.
Use the ADX Ad Unit ID issued for Banner Ad.
Before requesting an ad, SDK initialization must be done first.
SDK initialization should be called only once when the app launches and ad requests should be made after SDK initialization is complete.
2. Implementation
If the app is distributed on both Android and iOS, enter the Ad Unit ID issued for each platform.
Register the required callbacks.
Call
loadBannerAd()to load the ad.
String adUnitId = Platform.isAndroid ? "<ANDROID_ADX_BANNER_AD_UNIT_ID>" : "<IOS_ADX_BANNER_AD_UNIT_ID>";
AdxSdk.setBannerListener(BannerListener(
onAdLoaded: (){
},
onAdError: (int errorCode) {
},
onAdClicked: (){
}));
AdxSdk.setBannerPosition(adUnitId, AdxCommon.positionBottomCenter);
AdxSdk.loadBannerAd(adUnitId, AdxCommon.size_320x50);Call
destroyBannerAd()when the ad object is being disposed.
The supported sizes and positions for banner ads are as follows.
3. Callback
You can receive specific events. Implement as needed.
Last updated
Was this helpful?