Method signature

The method is meant to display banner advertisements found earlier with the FAPI.UI.requestBannerAds method.

FAPI.invokeUIMethod("showBannerAds")

The method makes the banner block with banner advertisements displayed on it visible. The position of the banner block is regulated by the “position” parameter. For example, bar format supports following position options:

  • bottom: the banner is displayed at the bottom of the device screen (default value);
  • top: the banner is displayed at the top of the device screen.

     

Complete list of supported formats is available with FAPI.UI.getBannerFormats method.

To set a format FAPI.UI.setBannerFormat method should be used.

Call example

function showBannerAds() {
FAPI.invokeUIMethod("showBannerAds", "top")
}

Callback example

As a result of a call, a callback with a notification on an event that happened will be returned to the game. Possible callbacks are described below.

A callback for a case when the advertisement block was displayed

method: “showBannerAds”

result: “ok”

data: “true”

A callback for a case when the advertisement block did not start displaying

method: “showBannerAds”

result: “ok”

data: “false”