Dash Stats Docs

Ad unit overview

The AppBrain SDK has several ad units that can be built into your Android app. They promote free apps to your users, earning you money for each install.

Preview

Select an ad unit to preview:

Interstitial

Promote free apps to your users in a non-intrusive way using our interstitial.

  • Shown during natural pause moments in your app
  • Built-in rate limiting

More information is available on the Interstitial documentation page.

Example code
private InterstitialBuilder interstitialBuilder;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Preload the AppBrain interstitial.
    interstitialBuilder = InterstitialBuilder.create()
        .setAdId("MY-ADID") // This line is optional, but highly
                            // recommended. Create your AD ID under
                            // "Ad settings" for your publisher
                            // app on our dashboard.
        .setListener(new InterstitialListener() {
            @Override
            public void onAdLoaded() {}

            @Override
            public void onAdFailedToLoad(InterstitialError error) {}

            @Override
            public void onPresented() {}

            @Override
            public void onClick() {}

            @Override
            public void onDismissed(boolean wasClicked) {
                // Code that you want to run after the user has dismissed
                // the interstitial goes here.

                // For example if you want to keep calling show on the
                // same interstitialBuilder then uncomment:
                // interstitialBuilder.preload(getContext());

                // For example:
                // startNextLevel();
            })
        .preload(this);
}

private void levelCompleted() {
    // Call this line when you want the interstitial to show up:
    interstitialBuilder.show(this);
}