Prebid Mobile 3.0 API Changes

This page provides a detailed list of removed APIs in PrebidMobile SDK 3.0, along with their corresponding recommended replacements.

Elimination of Deprecated Functionality

PrebidMobile 3.0 introduces significant changes and removes several deprecated features. Below is a detailed breakdown of these removals, and how publishers should migrate to the new alternatives.

PrebidMobile

Removed Alternative
isCoppaEnabled setSubjectToCOPPA()
useExternalBrowser None, removed.
sendMraidSupportParams None, by default true.
logLevel setLogLevel()
setPrebidServerHost() initializeSdk() with host parameter
setExternalUserIds() TargetingParams.setExternalUserIds()
initializeSdk(context, listener) initializeSdk() with host parameter
getApplicationContext() PrebidContextHolder.getContext()

Ad units

All classes with ad unit data: AdUnit, BannerView, InterstitialAdUnit, RewardedAdUnit, MediationBannerAdUnit, MediationBaseInterstitialAdUnit, MediationNativeAdUnit, PrebidRequest, TargetingParams.

Removed Alternative
addContextData() None, removed. Can be replaced with OpenRTB config.
updateContextData() None, removed. Can be replaced with OpenRTB config.
removeContextData() None, removed. Can be replaced with OpenRTB config.
clearContextData() None, removed. Can be replaced with OpenRTB config.
getContextDataDictionary() None, removed. Can be replaced with OpenRTB config.
addContextKeyword() None, removed. Can be replaced with OpenRTB config.
addContextKeywords() None, removed. Can be replaced with OpenRTB config.
removeContextKeyword() None, removed. Can be replaced with OpenRTB config.
clearContextKeywords() None, removed. Can be replaced with OpenRTB config.
getContextKeywordsSet() None, removed. Can be replaced with OpenRTB config.
addExtKeyword() None, removed. Can be replaced with OpenRTB config.
addExtKeywords() None, removed. Can be replaced with OpenRTB config.
removeExtKeyword() None, removed. Can be replaced with OpenRTB config.
clearExtKeywords() None, removed. Can be replaced with OpenRTB config.
getExtKeywordsSet() None, removed. Can be replaced with OpenRTB config.
addExtData() None, removed. Can be replaced with OpenRTB config.
updateExtData() None, removed. Can be replaced with OpenRTB config.
removeExtData(String key) None, removed. Can be replaced with OpenRTB config.
clearExtData() None, removed. Can be replaced with OpenRTB config.
getExtDataDictionary() None, removed. Can be replaced with OpenRTB config.
setAppContent() None, removed. Can be replaced with OpenRTB config.
getAppContent() None, removed. Can be replaced with OpenRTB config.
addUserData() None, removed. Can be replaced with OpenRTB config.
getUserData() None, removed. Can be replaced with OpenRTB config.
clearUserData() None, removed. Can be replaced with OpenRTB config.
setOrtbConfig() setImpOrtbConfig() or TargetingParams.setGlobalOrtbConfig()

AdUnit

Removed Alternative
setAutoRefreshPeriodMillis() setAutoRefreshInterval()
fetchDemand(OnCompleteListener2) fetchDemand(OnFetchDemandResult)

BannerAdUnit

Removed Alternative
setParameters() setBannerParameters()
getParameters() getBannerParameters()
Internal Parameters class BannerParameters

InterstitialAdUnit

Removed Alternative
setParameters() setBannerParameters()
getParameters() getBannerParameters()
Internal Parameters class VideoParameters

VideoAdUnit

The class was removed. Alternative - BannerAdUnit with video ad format.

VideoInterstitialAdUnit

The class was removed. Alternative - InterstitialAdUnit with video ad format.

Support Classes - TargetingParams

Removed Alternative
setUserAge() Deprecated in OpenRTB, removed. Can be replaced with OpenRTB config
getUserAge() None, removed.
getYearOfBirth() Deprecated in OpenRTB. Removed.
setYearOfBirth() Deprecated in OpenRTB, removed. Can be replaced with OpenRTB config
GENDER Deprecated in OpenRTB. Removed.
getGender() Deprecated in OpenRTB. Removed.
setGender() Deprecated in OpenRTB, removed. Can be replaced with OpenRTB config
setUserId() None, removed. Can be replaced with TargetingParams.setGlobalOrtbConfig()
getUserId() None, removed.
setBuyerId() None, removed. Can be replaced with TargetingParams.setGlobalOrtbConfig()
getBuyerId() None, removed.
getUserCustomData() None, removed.
setUserCustomData() None, removed. Can be replaced with TargetingParams.setGlobalOrtbConfig()
storeExternalUserId() setExternalUserIds() and getExternalUserIds()
fetchStoredExternalUserId() setExternalUserIds() and getExternalUserIds()
fetchStoredExternalUserIds() setExternalUserIds() and getExternalUserIds()
removeStoredExternalUserId() setExternalUserIds() and getExternalUserIds()
clearStoredExternalUserIds() setExternalUserIds() and getExternalUserIds()

ExternalUserId

Removed Alternative
ExternalUserId(source, identifier, atype, ext) ExternalUserId(source, uids)
getAtype() Use UniqueId class.
setAtype() Use UniqueId class.
getIdentifier() Use UniqueId class.
setIdentifier() Use UniqueId class.

PrebidNativeAd

Removed Alternative
registerView(view, listener) registerView(view, list, listener)
registerViewList(container, viewList, listener) registerView(view, list, listener)

AdFormat

Removed Alternative
DISPLAY BANNER

Host

Removed Alternative
APPNEXUS https://ib.adnxs.com/openrtb2/prebid
RUBICON https://prebid-server.rubiconproject.com/openrtb2/auction

NativeImageAsset

Removed Alternative
NativeImageAsset() NativeImageAsset(w, h, minw, minh)

Other Changes

  • Removed deprecated InitError class.
  • Removed deprecated SdkInitListener interface.
  • Removed deprecated OnCompleteListener interface.
  • Introduced SdkInitialization listener without deprecated callbacks.