πͺApp Open
AdSter SDK also gives the option to load and show AppOpen ad format which is the proprietary Ad format of Google Ad Manager and AdMob. Implementation is similar to that given in this document https://developers.google.com/admob/android/app-open. Instead of creating a new AppOpenAdManager mentioned in the document use the method below provided by AdSter SDK and follow the implementation on the Activity and Application class just like the document. AdSter SDK provides methods to show and load app-open ads
Create your AdRequestConfiguration as per the below format
val configuration = AdRequestConfiguration.builder(context, "Your_placement_name")Load App Open Ad
Call loadAd() method as per below format
AdSterAdLoader.Companion.builder().withAdsListener(new MediationAdListener() {
@Override
public void onFailure(@NonNull AdError adError) {
//Handle failure callback here
}
@Override
public void onAppOpenAdLoaded(@NonNull MediationAppOpenAd ad) {
super.onAppOpenAdLoaded(ad);
//Show App Open Ad here
}
}).withAppOpenAdEventsListener(new AppOpenAdEventsListener() {
@Override
public void onAdClicked() {
// Callback when ad is clicked
}
@Override
public void onAdImpression() {
// Callback when ad is shown
}
@Override
public void onAdOpened() {
// Callback when ad is opened
}
@Override
public void onAdClosed() {
// Callback when ad is cloed
}
@Override
public void onFailure(@Nullable AdError adError) {
// Callback when there is failure
}
@Override
public void onAdRevenuePaid(double revenue, @NotNull String adUnitId,@NotNull String network) {
// Callback which provides revenue and the network which provided it
}
}).build().loadAd(configuration.build());Show AppOpen Ad
Inside the onAppOpenAdLoaded callback method invoke showAd(activity) method of MediationAppOpenAd object to show AdSter App Open ad above any activity as shown below
Last updated