SDK Implementation Guide
  • 📱SDK Implementation Guide
  • How to Configure
    • 💡Initialising the SDK
  • How to Render an Ad
    • 📪Banner Ad
    • 📪Interstitial Ad
    • 📪Rewarded Ad
    • 📪Native Ad
    • 📪Custom Native Ad
  • Beta Ad Format's
    • 🎨App open (Beta)
    • 🎨In-stream Video (Beta)
  • Feature's only for GAM
    • 🎨Adaptive Banner Ad (Only for GAM)
    • 🎨Render Unified Ad (Only for GAM)
    • 🎨How to pass predefined custom targeting values in ad request (Only for GAM)
    • 🎨How to pass publisher provided identifiers in ad request (PPID) (Only for GAM)
    • TEST AD UNITS
  • Manifest Changes Required for SDK
  • Integrate Ads & APP Ads For Easy Management
Powered by GitBook
On this page
  • Load App Open Ad
  • Show AppOpen Ad

Was this helpful?

  1. Beta Ad Format's

App open (Beta)

PreviousCustom Native AdNextIn-stream Video (Beta)

Last updated 9 months ago

Was this helpful?

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 . 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.Companion.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) {
        // Calback when there is failure
    }
}).build().loadAd(configuration.build());
AdSterAdLoader.builder().withAdsListener(object : MediationAdListener(){
    override fun onAppOpenAdLoaded(ad: MediationAppOpenAd) {
        super.onAppOpenAdLoaded(ad)
        // Show App Open Ad here
    }
    override fun onFailure(adError: AdError) {
        //Handle failure callback here
    }

}).withAppOpenAdEventsListener(object : AppOpenAdEventsListener(){
    override fun onAdClicked() {
        // Handle Ad clicked here
    }

    override fun onAdClosed() {
        // Handle Ad closed here
    }

    override fun onAdImpression() {
        // Handle Ad impression here
    }

    override fun onAdOpened() {
        // Handle Ad Open here
    }

    override fun onFailure(adError: AdError?) {
        // Handle Ad Failure here
    }
}).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

@Override
public void onAppOpenAdLoaded(@NonNull MediationAppOpenAd ad) {
    super.onAppOpenAdLoaded(ad);
    ad.showAd(activity);
}
override fun onAppOpenAdLoaded(ad: MediationAppOpenAd) {
    super.onAppOpenAdLoaded(ad)
    ad.showAd(activity)
}
🎨
https://developers.google.com/admob/android/app-open