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 Details

    • onLoaded

      void onLoaded()
      The ad finished loading.
    • onFailedToLoad

      void onFailedToLoad(AdError error)
      The ad failed to load.
    • onShown

      void onShown()
      The ad was presented.
    • onShowFailed

      void onShowFailed(AdError error)
      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

      void onUserEarnedReward(RewardItem reward)
      The user earned a reward (rewarded formats only).