Android Migration guide

This page will walk you through the migration process from a SDK version to a newer one, starting from the version 8.0.0.

We advise you to update your SDK version on regular basis to avoid making the migration process more tedious, and to have access to new features and bug fixes.

Table of contents

  1. Migration from version 8.2.0 to 8.3.0
    1. Banner format
  2. Migration from version 8.1.0 to 8.2.0
    1. Banner format
    2. Interstitial format
  3. Migration from version 7.x to 8.3.0
    1. Native ad
  4. Migration from version 7.x to 8.1.0
    1. Parallax banner
  5. Migration from version 7.x to 8.0.0
    1. Integration changes
    2. APIs related to dropped or yet to come features
    3. APIs related to supported features

Migration from version 8.2.0 to 8.3.0

Updated Behaviors
  • The SASAdInfo ‘s aspectRatio can now be negative to invite you to use LayoutParams.WRAP_CONTENT instead of computing the height yourself.

Migration from version 8.1.0 to 8.2.0

Updated APIs
  • The SASBannerView.BannerListener interface has two new methods that require implementation, onBannerAdExpanded and onBannerAdCollapsed, to be notified when the banner expand state changes.

Interstitial format

Updated APIs
  • The main constructor now requires an Activity instance to be passed instead of a more generic Context instance.

For more detail, please refer to the interstitial integration guide.

Migration from version 7.x to 8.3.0

Native ad

The native ad format has been added to the Equativ Display SDK 8.3.0.

Everything have changed compared to the native ad integration in the Smart Display SDK v7.x. The native ad rendering is now done by the SDK. For more details, please check the native ad integration article.

Migration from version 7.x to 8.1.0

Parallax banner

The parallax banner has been added to the Equativ Display SDK 8.1.0.

The setParallaxMarginBottom and setParallaxMarginTop properties of SASBannerView which were used to setup the parallax creative margins have been replaced by the parallaxMargins property, which is an instance of the new SASParallaxMargins class.

For more detail, please refer to the banner integration guide.

Migration from version 7.x to 8.0.0

Integration changes

All the integration related information can be found here.

Library name

The fully qualified name of the library has changed with this version 8.0.0.

You’ll have to update the declared dependency from com.smartadserver.com:smart-display-sdk:X.Y.Z to com.equativ.android:equativ-display-sdk:X.Y.Z.

minSdkVersion

The minSdkVersion has been bumped from 19 to 23, meaning your application’s will need to declare aminSdkVersion of 23 at least to integrate the Equativ Display SDK 8.0.0.

The following list wraps up all the classes, interfaces and APIs related to features that are not currently available in the Equativ Display SDK 8.0.0, but were in the previous versions.

Some of those features will be supported in future releases, some others will not be anymore. Please have a look to our roadmap for more information about the upcoming features.

  • SASNativeParallaxAdElement model class.
  • setParallaxMarginBottom, setParallaxMarginTop and setParallaxOffset methods of the SASBannerView.
  • SASNativeAdElement class and its inner classes SASNativeAdElement.ClickHandler, SASNativeAdElement.ImageElement and SASNativeAdElement.OnClickListener.
  • SASNativeAdManager class and its listener SASNativeAdManager.NativeAdListener.
  • SASNativeAdMediaView class.
  • SASRewardedVideoManager class and its listener SASRewardedVideoManager.RewardedVideoListener.
  • SASReward class.
  • SASMediationAdapter interface and its related listener SASMediationAdapterListener, and all their implementations :
  • SASMediationBannerAdapter and SASMediationBannerAdapterListener.
  • SASMediationInterstitialAdapter and SASMediationInterstitialAdapterListener.
  • SASMediationNativeAdAdapter, SASMediationNativeAdAdapterListener and SASMediationNativeAdContent.
  • SASMediationRewardedVideoAdapter and SASMediationRewardedVideoAdapterListener.
  • SASBiddingAdManager class and its listener SASBiddingAdManager.SASBiddingAdManagerListener.
  • SASBiddingAdPrice, SASBiddingAdResponse and SASBiddingAdFormatType model/enum classes.
  • SASBidderAdapter interface and its implementations:
    • SASBannerBidderAdapter and its listener SASBannerBidderAdapterListener.
    • SASInterstitialBidderAdapter and its listener SASInterstitialBidderAdapterListener.
  • SASBidderAdapter.CompetitionType and SASBidderAdapter.RenderingType enum classes.

Package name

The root package of the SDK has changed from com.smartadserver.android.library to com.equativ.displaysdk. Therefore, all classes and interfaces are impacted.

SASConfiguration

SASConfiguration remains a singleton object, but it is now a a Kotlin object instead of a java class using the singleton pattern. It can therefore be used directly without the need to call a getSharedInstance method (that was been removed as a Kotlin object acts as a singleton. See the official Kotlin documentation).

You can now access its APIs as follows:

Kotlin

SASConfiguration.<the api>

Java

SASConfiguration.INSTANCE.<the api>
Removed APIs
  • setForcedLocation and getForcedLocation.
  • setManualBaseUrl. The support of manualBaseUrl was dropped.
  • setCustomIdentifier and getCustomIdentifier.
Updated APIs
  • Both configure(context: Context, siteId: Int) and configure(context: Context, siteId: Int, manualBaseUrl: String) were replaced by a single method configure(context: Context) . This new method doesn’t need a site ID or manualBaseUrl parameters because the SDK will always use the base URL related to the current ad call site ID, found in the ad placement.

SASLibraryInfo

SASLibraryInfo remains a singleton, but it is now a a Kotlin object instead of a java class using the singleton pattern. It can therefore be used directly without the need to call a getSharedInstance method (that was been removed as a Kotlin object acts as a singleton. See the official Kotlin documentation).

You can now access its APIs as follows:

Kotlin

SASLibraryInfo.<the api>

Java

SASLibraryInfo.INSTANCE.<the api>

Ad placement

Test placements

The test placement list definition is now done within a companion object in the SASAdPlacement . You’ll find more information on how to use them here.

Constructors

There is only 1 contructor remaining to instantiate SASAdPlacement

constructor(siteId: Long, pageId: Long, formatId: Long, keywordTargetingString: String? = null) .

All of the constructors using pageName were dropped, because pageName is not supported anymore.

Also, the contructor using the supplyChainObject parameter is not available anymore. The supplyChainObjectString parameter is now available as a mutable property. Please refer to the API reference documentation of the supplyChainObjectString property.

Removed APIs
  • contentUrl property was dropped.
  • mediationExtraParameters property was dropped as mediation is not implemented yet.
  • isMaster() method was dropped.
  • usesPageName() method was dropped, as pageName is not supported anymore.

Exceptions

From now on, the Equativ Display SDK will only return only one class of Exception in case of error, the SASException class. This class has a type property letting you know the type of error encountered. This SASException class and its ‘type’ values covers all the cases where the older Exception classes the Display SDK 7.x would be thrown.

Therefore, the following classes have been removed:

  • SASAdDisplayTimeoutException
  • SASAdTimeoutException
  • SASInvalidJSONException
  • SASNoAdToDeliverException
  • SASPendingAdException
  • SASVASTParsingException

SASAdElement

The model class SASAdElement that was returned in successful adLoaded callbacks does not exist anymore.

From now on, successful adLoaded callbacks will return a SASAdInfo instance instead.

All other AdElement model classes were removed too:

  • SASMediationAdElement
  • SASNativeAdElement
  • SASNativeParallaxAdElement
  • SASNativeVideoAdElement

The implementation documentation of SASBannerView can be found here.

Removed APIs
  • getCurrentAdElement was removed. Use the SASAdInfo instance returned in the onBannerAdLoaded callback instead.
  • getExpectedFormatType.
  • installLoaderView and removeLoaderView. The loader view is not supported anymore.
  • setParallaxMarginBottom, setParallaxMarginTop and setParallaxOffset, as the parallax feature is not implemented yet.
  • sendMessageToWebView. This feature is not supported anymore.
  • setRefreshInterval.
  • APIs related to the sticky mode, such as setStickyModeAnchorView and dismissStickyMode.
  • MessageHandler support was dropped.
Updated APIs
Listener

All callback methods of SASBannerView.BannerListener have changed.

SASBannerView.BannerListener removed callbacks:

  • onBannerAdClosed
  • onBannerAdCollapsed
  • onBannerAdExpanded
  • onBannerAdResized
  • onBannerAdVideoEvent

SASBannerView.BannerListener updated callbacks:

Interstitial format

The implementation documentation of SASInterstitialManager can be found here.

Removed APIs
  • There is no more OnCrashListener to set on the SASInterstitialManager .
  • getCurrentAdElement was removed. Use the SASAdInfo instance returned in the onInterstitialAdLoaded callback instead.
  • MessageHandler support was dropped.
  • isShowable was removed. This information can be found by using the SASAdStatus property.
  • sendMessageToWebView. This feature is not supported anymore.
  • reset is now unavailable.
Updated APIs
  • The constructor related to the In-app bidding were removed.
  • There is only one loadAd method to call. All other load methods were removed.
Listener

The interstitial listener was renamed from SASInterstitialManager.InterstitialListener to SASInterstitialManager.InterstitialManagerListener .

All callback methods of SASInterstitialManager.InterstitialManagerListener have changed.

SASInterstitialManager.InterstitialManagerListener removed callbacks:

  • onInterstitialAdVideoEvent

SASInterstitialManager.InterstitialManagerListener updated callbacks:


Back to top

Copyright Equativ © 2024. All right reserved.

Page last modified: Nov 13 2024.