Interface AdCallback<T>


public interface AdCallback<T>

Single-method callback used throughout the advertising API for asynchronous results (initialization, consent, native ad loading). It is a functional interface, so it can be supplied as a lambda:

AdManager.initialize(config, ready -> {
    if (ready) {
        interstitial.load();
    }
});

The value is always delivered on the Codename One EDT.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onResult(T value)
    Invoked once with the asynchronous result.
  • Method Details

    • onResult

      void onResult(T value)

      Invoked once with the asynchronous result.

      Parameters
      • value: the result value