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;
- current mobile device layout.
Call example
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”,”current_count”:1,”count_options”:[1,2],”supported”:{“bar”:[“top”,”bottom”],”bar_outer”:[“top”,”bottom”],”outer”:[“top”,”bottom”],”thin”:[“top”,”bottom”],”thin_outer”:[“top”,”bottom”],”vertical”:[“left”,”right”],”vertical_outer”:[“left”,”right”]}}’
Where:
- current - currently selected display format;
- supported - list of supported display formats with their options;
- restrictions - list of restrictions for each format;
- current_count - current amount of banners to show at once;
- count_options - options for amount of banners to show at once.
Supported formats
At the moment following formats are supported:
Format | Description | Platforms | Display options | Supported layouts |
bar | Horizontal banner displayed on top of game container | desktop mobile android (from 22.11.17) ios (from 10.50) | top bottom | landscape portrait |
outer (deprecated) bar_outer | Horizontal banner displayed which offsets game container | desktop mobile android (from 23.9.4) ios (from 10.50) | top bottom | landscape portrait |
thin | Thin horizontal banner displayed on top of game container | web mobile android (from 24.3.4) | top bottom | landscape |
thin_outer | Thin horizontal banner displayed which offsets game container | web mobile android (from 24.3.4) | top bottom | landscape |
vertical | Vertical banner displayed on top of game container | web mobile android (from 24.3.4) ios (from 10.50) | left right | landscape |
vertical_outer | Vertical banner displayed which offsets game container | web mobile android (from 24.3.4) ios (from 10.50) | left right | landscape |
Banner size
The size of the banner displayed upon the call of the method depends on following parameters:
- platform;
- display layout for mobile platfomrs;
- banner format.
|Platform|Format|Display layout|Width|Height| |android|bar|portrait|100%|106dp| |android|bar|landscape|362dp|106dp| |ios|bar|portrait|100%|106dp| |ios|bar|landscape|362dp|106dp| |mobile web|bar|portrait|404px|106dp| |mobile web|bar|landscape|404px|106dp| |web|bar|-|404px|96px| |android|bar_outer|portrait|100%|106dp| |android|bar_outer|landscape|100|106dp| |ios|bar_outer|portrait|100%|106dp| |ios|bar_outer|landscape|100|106dp| |mobile web|bar_outer|portrait|100%|96px| |mobile web|bar_outer|landscape|100%|96px| |web|bar_outer|-|100%|96px| |android|thin|landscape|100%|56dp| |mobile web|thin|landscape|100%|48px| |web|thin|-|404px|48px| |android|thin_outer|landscape|100%|56dp| |mobile web|thin_outer|landscape|100%|48px| |web|thin_outer|-|100%|48px| |android|vertical|landscape|120dp|202dp-284dp| |ios|vertical|landscape|120dp|202dp-284dp| |mobile web|vertical|landscape|104px|276px| |web|vertical|-|240px|400px| |android|vertical_outer|landscape|120dp|100%| |ios|vertical_outer|landscape|120dp|100%| |mobile web|vertical_outer|landscape|104px|100%| |web|vertical_outer|-|240px|400px|