Method signature
Method returns a list of supported display formats for banner ads.
List of supported formats depends on:
- current platform;
- android OK app version.
FAPI.invokeUIMethod("getBannerFormats")
Call example
function getBannerFormats() {
FAPI.invokeUIMethod("getBannerFormats")
}
Callback example
Method’s callback will contain a list of supported display formats, currently selected display format and display option for each format.
method: “getBannerFormats”
result: “ok”
data: ‘{“current”:”bar”,”supported”:{“bar”:[“top”,”bottom”],”outer”:[“top”,”bottom”]}}’
Where:
- current - currently selected display format;
- supported - list of supported display formats with their options.
Supported formats
At the moment following formats are supported:
Format | Description | Platforms | Display options |
bar | Horizontal banner displayed on top of game container | desktop, mobile, android (from 22.11.17) | top, bottom |
outer | Horizontal banner displayed which offsets game container | mobile, android (from 23.9.4) | top, bottom |
Banner size
The size of the banner displayed upon the call of the method depends on following parameters:
- platform (Android only at the moment);
- type of display of the user’s device screen.
For each platform, the banner size for each state of the user’s device screen is predetermined.
Android platform
Banner size for landscape orientation:
- width: 362 dp;
- height: 106 dp.
Banner size for portrait orientation:
- width: 100% of the screen;
- height: 106 dp.
Other platforms
Banner size for any orientation:
- width: 404 px;
- height: 96 px.