InterstitialListener
- public interface InterstitialListener
This is a listener interface to be notified when someone clicks on an AppBrain interstitial, and when it’s shown and dismissed. This is purely for reporting purposes, the implementation takes care of opening the offerwall etc.
- Author
AppBrain
Methods
- void onAdFailedToLoad(InterstitialError error)
Gets called after the interstitial failed to load. This method gets called on the UI thread. Either onAdLoaded or onAdFailedToLoad will be called after requesting an interstitial through
InterstitialBuilder
‘s preload or show methods and before actually showing it.- Parameters
error – if
InterstitialError.NO_FILL
loading the interstitial failed because there was no suitable ad available, otherwise (InterstitialError.ERROR
) loading failed for some other reason.
- void onAdLoaded()
Gets called after the interstitial was loaded successfully. This method gets called on the UI thread. Either onAdLoaded or onAdFailedToLoad will be called after requesting an interstitial through
InterstitialBuilder
‘s preload or show methods and before actually showing it. Only if you callInterstitialBuilder.preload(Context)
multiple times in a row, onAdLoaded() will only be called once.
- void onClick()
Gets called when an interstitial receives a click from the user. This method gets called on the UI thread.
- void onDismissed(boolean wasClicked)
Gets called after the interstitial is dismissed. This method gets called on the UI thread.
- Parameters
wasClicked – if true, the interstitial is dismissing for the user to go on after clicking an ad, if false, the user just closed the interstitial.
- void onPresented()
Called when the interstitial is shown to the user. This method gets called on the UI thread.