Show Sidebar

Upgrade Guide for VMAX Android SDK 3.7.0

 

Older VMAX Android SDK versions (prior to 3.7) will be deprecated soon. You are requested to upgrade to version 3.7+ at the earliest to continue using VMAX in your apps.

VMAX Android SDK 3.7+ has following changes compared to earlier version 3.6:
What’s new?

VmaxAdListener class has been completely modified

UX for Native ads
3.6.X had the UX type UX_NATIVE for requesting the native ads is now removed.Below are the revised UX_TYPE constants for below layouts.
1.ContentStream: “UX_NATIVE_CONTENT_STREAM”
2.Infeed: “UX_NATIVE_INFEED”
3.Icon: “UX_NATIVE_ICON”
4.Custom:“UX_NATIVE”

Native Helper Libraries
In earlier versions developers were expected to include native helper dependencies in their project to render native ads from SDK version 3.7.0 onwards these libraries would be a part of the SDK and it wont be expected to add these libraries externally. In order to remove helper libraries and related assets you need to delete below files manually from your application project according to the format integrated.

1.ContentStream: libs/contentstream.jar, layout/vmax_content_stream.xml, layout/vmax_admobnativeinstall.xml, drawable/vmax_nativebg_ad.xml, drawable/vmax_nativeborder.xml.

2.Infeed: libs/infeed.jar, layout/vmax_admobcontentad.xml, layout/vmax_in_feed.xml,
drawable/vmax_nativebg_ad.xml, drawable/vmax_nativeborder.xml.

3.Icon: libs/icon.jar layout/vmax_icon.xml, layout/vmax_icon_480.xml, layout/vmax_icon_480_landscape.xml,layout/vmax_icon_landscape.xml, drawable/vmax_nativebg_ad.xml, drawable/vmax_nativeborder.xml.

Note: If you are upgrading from a previous version of VMAX SDK to VMAX SDK version 3.8.0 or above make sure that you remove the below mentioned API/XML attributes related to setting Ad-Mob Native express ads height and width ,as support for Ad-Mob Native express ads has been discontinued these API/XML attributes have been deprecated.

 

XML approach handling
In earlier versions, while using XML approach developers were expected to explicitly request ads either using loadAd() API or cacheAd() API inside an Activty class. From SDK version 3.7.0 onwards just placing VmaxAdView in an XML layout would load the Ad.

Ad Refresh Handling

Refresh for Native ad

In earlier versions, developers were expected to manage refresh for native ads explicitly. From SDK version 3.7.0 onwards it will be managed by default. You can implement refresh in XML approach and programmatic approach as follows

1.XML Approach

2.Programmatic Approach


Note:While implementing with programmatically if you are using the cacheAd()->showAd() approach sdk will auto refresh ads in case if you want to disable refresh you can pass 0 in the API setRefreshRate()

API Changes

The following classes and apis are now obsolete.

Classes removed

VmaxAdSettings

VmaxAdPartner

APIs removed

VmaxAdView

.loadAd()

.setSection()

.setAdSettings()

.showBanner()

.hideBanner()

.finish()

.onBackPressed()

.getAdType()

.onPause()

.onResume()