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 and above
    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.4.0
    1. Integration changes
    2. APIs related to supported features
    3. APIs related to dropped or yet to come features

Migration from version 8.2.0 to 8.3.0 and above

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.4.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 a minSdkVersion of 23 at least to integrate the Equativ Display SDK 8.0.0.

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.
  • 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:

Native ad format

The native ad format has been added to the Equativ Display SDK 8.3.0, and its API underwent a complete redesign compared to the native ad integration in the Smart Display SDK v7.x. The native ad rendering is now done by the SDK, via the SASNativeAdView or the SASBannerView classes.

Consequently, all classes and methods related to native ads in the Smart Display SDK v7.x , such as the SASNativeAdManager, SASNativeAdElement and SASNativeAdMediaView were removed.

For more details, please check the native ad integration article.

Mediation API (for the Equativ Display SDK as primary SDK)

Although similar to its counterpart in Smart Display SDK v7.x, the mediation API for the Equativ Display SDK as primary SDK was redesigned, and only the SASMediationBannerAdapter and SASMediationInterstitialAdapter class names remained the same, their methods and properties being different.

For more details, please check the Mediation as Primary SDK article, and more particularly the implement a custom mediation adapter article if you intend to implement your own Android mediation adapter for a third-party SDK that is not yet provided by Equativ.

In-App Bidding

The In-app bidding feature has been added to the Equativ Display SDK 8.4.0.

The API is very similar to the Smart Display SDK v7.x one, except for a few differences:

  • the BiddingManagerListener listener class is now a property of the SASBiddingManager class instead of being passed in the constructor.
  • the load() method of the SASBiddingManager class in the Smart Display SDK v7.x was renamed to loadAd() in the Equativ Display SDK
  • the currency String property of the SASBiddingAdPrice class in the the Smart Display SDK v7.x was replaced by a SASBiddingAdCurrency enum class in the Equativ Display SDK
  • for a SASInterstitialManager instantiated from a SASBiddingAdResponse, once the loadAd() is called to render the bidding ad, any subsequent call to loadAd() will simply trigger the onInterstitialAdLoaded() callback method again, contrary to the Smart Display SDK v7.x where an exception was thrown stating that the SASBiddingAdResponse had been consumed already.

For more detail, please refer to the in-app integration guide.

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.4.0, but were in the previous versions.

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

  • SASRewardedVideoManager class and its listener SASRewardedVideoManager.RewardedVideoListener.
  • SASReward class.
  • SASBidderAdapter interface and its implementations:
    • SASBannerBidderAdapter and its listener SASBannerBidderAdapterListener.
    • SASInterstitialBidderAdapter and its listener SASInterstitialBidderAdapterListener.
  • SASBidderAdapter.CompetitionType and SASBidderAdapter.RenderingType enum classes.

Back to top

Copyright Equativ © 2024. All right reserved.

Page last modified: Jan 2 2025.