Interface BannerAdSession


public interface BannerAdSession

A provider's handle for a banner ad. The getView() component is embedded in the Codename One component tree by BannerAd; on a device it wraps a native ad view via a peer component, while in the simulator it is a lightweight placeholder.

This is an internal SPI type.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases native resources held by this session.
    The component to embed in the UI, never null.
    void
    load(AdRequest request)
    Begins loading a banner ad.
    void
    Registers the callback used to report lifecycle events.
  • Method Details

    • getView

      Component getView()
      The component to embed in the UI, never null.
    • setCallback

      void setCallback(AdSessionCallback callback)
      Registers the callback used to report lifecycle events. Called once immediately after creation.
    • load

      void load(AdRequest request)
      Begins loading a banner ad. The request may be null for a default load.
    • dispose

      void dispose()
      Releases native resources held by this session.