Interstitial Ad
1. Basic Requirements
Add ADX Flutter SDK to your project.
Use the ADX Ad Unit ID issued for Interstitial 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 necessary callbacks.
Call
AdxSdk.loadInterstitial()to load the ad.Call
AdxSdk.destroyInterstitial()when disposing of the ad object.
String adUnitId = Platform.isAndroid ? "<ANDROID_ADX_INTERSTITIAL_AD_UNIT_ID>" : "<IOS_ADX_INTERSTITIAL_AD_UNIT_ID>";
AdxSdk.setInterstitialListener(InterstitialAdListener(
onAdLoaded: (){
},
onAdError: (int errorCode){
},
onAdImpression: (){
},
onAdClicked: (){
},
onAdClosed: (){
},
onAdFailedToShow: (){
})
);
AdxSdk.loadInterstitial(adUnitId);Once the ad is loaded, call
showInterstitial()to display the ad.
Call
destroyInterstitial()when disposing of the ad object.
3. Callback
You can receive specific events. Implement as needed.
Last updated
Was this helpful?