Documentation

Unity Monetization

Android deprecated APIs

Identify deprecated Unity Ads SDK classes for Android (java), as well as the replacement and removal versions.
Read time 2 minutesLast updated 10 hours ago

Android deprecated classes (java)

The following API classes are deprecated or obsolete for the Android SDK:

API to be removed

Deprecated in version

What to use instead

Removed in version

Depreciation reason

initialize(final Activity activity, final String gameId, final IUnityAdsListener listener)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final IUnityAdsInitializationListener initializationListener)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final IUnityAdsListener listener, final boolean testMode)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final boolean testMode)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final boolean testMode, final IUnityAdsInitializationListener initializationListener)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final IUnityAdsListener listener, final boolean testMode, final boolean enablePerPlacementLoad)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Activity activity, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad, final IUnityAdsInitializationListener initializationListener)
3.4.0Use the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Context context, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad)
NAUse the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
initialize(final Context context, final String gameId, final boolean testMode, final boolean enablePerPlacementLoad, final IUnityAdsInitializationListener initializationListener)
NAUse the consolidated
initialize
method signature.
4.0.0Replaced by consolidated
initialize
API.
setListener(IUnityAdsListener listener)
3.4.0Use the
initialize
,
load
, and
show
methods' listeners.
4.0.0Improved callbacks for
Show
and
Load
APIs.
getListener()
3.4.0Use the
initialize
,
load
, and
show
methods' listeners.
4.0.0Improved callbacks for
Show
and
Load
APIs.
addListener(IUnityAdsListener listener)
NAUse the
initialize
,
load
, and
show
methods' listeners.
4.0.0Improved callbacks for
Show
and
Load
APIs.
removeListener(IUnityAdsListener listener)
NAUse the
initialize
,
load
, and
show
methods' listeners.
4.0.0Improved callbacks for
Show
and
Load
APIs.
isReady()
3.7.1Use the updated
load
method signature to access load callbacks.
4.0.0Introduced a
Load
API with callbacks.
isReady(String placementId)
3.7.1Use the updated
load
method signature to access load callbacks.
4.0.0Introduced a
Load
API with callbacks.
getPlacementState()
NANo direct replacement.4.0.0No longer required with
Load
and
Show
functionality.
show(final Activity activity)
3.7.0Use the updated
show
method signature to access show callbacks.
4.0.0Introduced a
Show
API with callbacks.
IUnityAdsListener
NAUse the
IUnityAdsInitializationListener
,
IUnityAdsLoadListener
,
IUnityAdsShowListener
interfaces.
4.0.0Improved callbacks for
Show
and
Load
APIs.
IUnityAdsExtendedListener
NAUse the
IUnityAdsShowListener
interface.
4.0.0Improved callbacks for
Show
and
Load
APIs.
com.unity3d.services.monetization
NAUse the
UnityAds.java
API.
4.0.0Legacy
Monetization
API not supported.
com.unity3d.services.purchasing
NANo direct replacement.4.0.0Legacy
Monetization
API not supported.