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
- Migration from version 8.1.0 to 8.2.0
- Migration from version 7.x to 8.1.0
- Migration from version 7.x to 8.0.0
Migration from version 8.1.0 to 8.2.0
Banner format
Updated APIs
- The
SASBannerListener
interface has two new methods that require implementation,onBannerAdExpanded
andonBannerAdCollapsed
, 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.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.
APIs related to dropped or yet to come features
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.
Parallax format related APIs
-
SASNativeParallaxAdElement
model class. -
setParallaxMarginBottom
,setParallaxMarginTop
andsetParallaxOffset
methods of theSASBannerView
.
Native-ad format related APIs
-
SASNativeAdElement
class and its inner classesSASNativeAdElement.ClickHandler
,SASNativeAdElement.ImageElement
andSASNativeAdElement.OnClickListener
. -
SASNativeAdManager
class and its listenerSASNativeAdManager.NativeAdListener
. -
SASNativeAdMediaView
class.
Rewarded video format related APIs
-
SASRewardedVideoManager
class and its listenerSASRewardedVideoManager.RewardedVideoListener
. -
SASReward
class.
Mediation related APIs
-
SASMediationAdapter
interface and its related listenerSASMediationAdapterListener
, and all their implementations : -
SASMediationBannerAdapter
andSASMediationBannerAdapterListener
. -
SASMediationInterstitialAdapter
andSASMediationInterstitialAdapterListener
. -
SASMediationNativeAdAdapter
,SASMediationNativeAdAdapterListener
andSASMediationNativeAdContent
. -
SASMediationRewardedVideoAdapter
andSASMediationRewardedVideoAdapterListener
.
1st party in-app bidding related APIs
-
SASBiddingAdManager
class and its listenerSASBiddingAdManager.SASBiddingAdManagerListener
. -
SASBiddingAdPrice
,SASBiddingAdResponse
andSASBiddingAdFormatType
model/enum classes.
3rd party in-app bidding related APIs
-
SASBidderAdapter
interface and its implementations:-
SASBannerBidderAdapter
and its listenerSASBannerBidderAdapterListener
. -
SASInterstitialBidderAdapter
and its listenerSASInterstitialBidderAdapterListener
.
-
-
SASBidderAdapter.CompetitionType
andSASBidderAdapter.RenderingType
enum classes.
APIs related to supported features
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:
Removed APIs
-
setForcedLocation
andgetForcedLocation
. -
setManualBaseUrl
. The support ofmanualBaseUrl
was dropped. -
setCustomIdentifier
andgetCustomIdentifier
.
Updated APIs
- Both
configure(context: Context, siteId: Int)
andconfigure(context: Context, siteId: Int, manualBaseUrl: String)
were replaced by a single methodconfigure(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:
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
Banner format
The implementation documentation of SASBannerView
can be found here.
Removed APIs
-
getCurrentAdElement
was removed. Use theSASAdInfo
instance returned in theonBannerAdLoaded
callback instead. -
getExpectedFormatType
. -
installLoaderView
andremoveLoaderView
. The loader view is not supported anymore. -
setParallaxMarginBottom
,setParallaxMarginTop
andsetParallaxOffset
, 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
anddismissStickyMode
. -
MessageHandler
support was dropped.
Updated APIs
- There is only one
loadAd
method to call. All other load methods were removed. -
getRatio
is not accessible anymore on theSASBannerView
. From now on, you will find this ratio value in theSASAdInfo
returned by theonBannerAdLoaded
callback of theSASBannerView.BannerListener
. More information in the dedicatec banner documentation.
Listener
All callback methods of SASBannerView.BannerListener
have changed.
SASBannerView.BannerListener
removed callbacks:
onBannerAdClosed
onBannerAdCollapsed
onBannerAdExpanded
onBannerAdResized
onBannerAdVideoEvent
SASBannerView.BannerListener
updated callbacks:
-
onBannerAdLoaded
does not return the instance of theSASBannerView
that triggered the listener anymore, and provides an instance ofSASAdInfo
instead of aSASAdElement
. -
onBannerAdFailedToLoad
does not return the instance of theSASBannerView
that triggered the listener anymore and always provides aSASException
instance. -
onBannerAdClicked
does not return the instance of theSASBannerView
that triggered the listener anymore.
Interstitial format
The implementation documentation of SASInterstitialManager
can be found here.
Removed APIs
- There is no more
OnCrashListener
to set on theSASInterstitialManager
. -
getCurrentAdElement
was removed. Use theSASAdInfo
instance returned in theonInterstitialAdLoaded
callback instead. -
MessageHandler
support was dropped. -
isShowable
was removed. This information can be found by using theSASAdStatus
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:
-
onInterstitialAdLoaded
does not return the instance ofSASInterstitialManager
anymore and provides an instance ofSASAdInfo
instead of aSASAdElement
. - does not return the instance of
SASInterstitialManager
anymore and always provides aSASException
instance. -
onInterstitialAdShown
does not return the instance ofSASInterstitialManager
anymore. -
onInterstitialAdFailedToShow
does not give the instance ofSASInterstitialManager
anymore and always provides aSASException
instance. -
onInterstitialAdDismissed
is renamedonInterstitialAdClosed
and does not return the instance ofSASInterstitialManager
anymore. -
onInterstitialAdClicked
does not return the instance ofSASInterstitialManager
anymore.