Interface AdSessionCallback
public interface AdSessionCallback
The callback a AdProvider uses to report ad lifecycle events back to the
Codename One ads layer. Providers may invoke these methods from any thread;
the ads layer marshals them onto the EDT before forwarding to the public
AdListener.
This is an internal SPI type; applications use AdListener.
-
Method Summary
Modifier and TypeMethodDescriptionvoidThe ad was clicked.voidThe ad was dismissed.voidonFailedToLoad(AdError error) The ad failed to load.voidAn impression was recorded.voidonLoaded()The ad finished loading.voidonShowFailed(AdError error) The ad failed to present.voidonShown()The ad was presented.voidonUserEarnedReward(RewardItem reward) The user earned a reward (rewarded formats only).
-
Method Details
-
onLoaded
void onLoaded()The ad finished loading. -
onFailedToLoad
The ad failed to load. -
onShown
void onShown()The ad was presented. -
onShowFailed
The ad failed to present. -
onDismissed
void onDismissed()The ad was dismissed. -
onImpression
void onImpression()An impression was recorded. -
onClicked
void onClicked()The ad was clicked. -
onUserEarnedReward
The user earned a reward (rewarded formats only).
-