Interface 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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidGets called after the interstitial failed to load.voidGets called after the interstitial was loaded successfully.voidonClick()Gets called when an interstitial receives a click from the user.voidonDismissed(boolean wasClicked) Gets called after the interstitial is dismissed.voidCalled when the interstitial is shown to the user.
-
Method Details
-
onPresented
void onPresented()Called when the interstitial is shown to the user. This method gets called on the UI thread. -
onClick
void onClick()Gets called when an interstitial receives a click from the user. This method gets called on the UI thread. -
onDismissed
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.
-
onAdLoaded
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 throughInterstitialBuilder'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. -
onAdFailedToLoad
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 throughInterstitialBuilder's preload or show methods and before actually showing it.- Parameters:
error- ifInterstitialListener.InterstitialError.NO_FILLloading the interstitial failed because there was no suitable ad available, otherwise (InterstitialListener.InterstitialError.ERROR) loading failed for some other reason.
-