Show Sidebar

Requesting Banner Ads – Android SDK

ขออภัยรายการนี้จะใช้ได้เฉพาะในภาษาอังกฤษ English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

For Banner Ads, please ensure that you have turned off the refresh from the mediation partner’s web interface when using a fresh integration of VMAX SDK 3.4.0 or higher. This change in settings is not required when updating from an earlier version to 3.4.0 or higher.
Also ensure that the banner view/container in which the banner will appear is not visible by default. Use the onAdStarted() callback to make the banner view/container visible and hide it using onAdDismissed() so as to avoid any conflict with Ad network banners from mediation partners.

SDK 3.6.0 onwards

To request a banner through XML (preferred)

Create below VmaxAdview in your main Layout file

Code to invoke Banner Ads in your Activity class

To request a banner programmatically

Create below Layout in main layout file

Code to invoke Banner Ads in your Activity class

Advanced

VMAX allows you to cache a banner ad in one Activity and show it in a different Activity.

To Cache Banners Programmatically

Code to invoke Banner Ads in your Activity class

To Show Banners Programmatically

Create below Layout in main layout file

Before SDK 3.6.0

To request a banner through XML (preferred)

Create below VmaxAdview in your main Layout file

Code to invoke Banner Ads in your Activity class

To request a banner programmatically

Create below Layout in main layout file

Code to invoke Banner Ads in your Activity class

Advanced

VMAX allows you to cache a banner ad in one Activity and show it in a different Activity.

To Cache Banners Programmatically

Code to invoke Banner Ads in your Activity class

To Show Banners Programmatically

Create below Layout in main layout file

What would you like to do next?