Android deprecated APIs
Identify deprecated Unity Ads SDK classes for Android, as well as the replacement and removal versions.
Read time 4 minutesLast updated a day ago
Android deprecated classes
The following API classes are deprecated or obsolete for the Android SDK for the Unity Ads SDK version 4.19.0.Initialization
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | | 5.0.0 | Replaced by a builder-based configuration API with a unified single-method listener. Mediation info is now passed at initialization time via the builder. |
| 4.19.0 | | 5.0.0 | Two-method delegate replaced by a single nullable-error callback, consistent with the unified |
| 4.19.0 | | 5.0.0 | Mutable key-value metadata object replaced by an immutable typed value object passed directly into the builder API. |
| 4.19.0 | Use | 5.0.0 | Generic string key-value metadata replaced by typed, purpose-specific APIs. |
| 4.19.0 | Unified | 5.0.0 | Per-operation error enums replaced by a unified error type with standardized numeric codes across all operations. |
Interstitial ads
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | | 5.0.0 | Static generic load replaced by a type-specific instance-based load API. |
| 4.19.0 | | 5.0.0 | Two-method listener replaced by a single nullable-error callback that also delivers the typed ad instance. |
| 4.19.0 | | 5.0.0 | Mutable options object replaced by an immutable builder-pattern configuration. |
| 4.19.0 | No replacement — object ID is now managed internally by the SDK | 5.0.0 | Manual correlation IDs are no longer required; the SDK handles ad instance tracking internally. |
| 4.19.0 | | 5.0.0 | Static show on the global class replaced by an instance method on the loaded ad object. |
| 4.19.0 | | 5.0.0 | String-keyed, generic show listener replaced by a typed ad-specific listener. Callbacks receive the ad instance rather than a placement ID string. |
| 4.19.0 | | 5.0.0 | Mutable options object replaced by an immutable builder-pattern show configuration. |
| 4.19.0 | No replacement — object ID is managed internally | 5.0.0 | Manual correlation IDs are no longer required. |
| 4.19.0 | Unified | 5.0.0 | Per-operation error enum replaced by the unified error type. |
| 4.19.0 | Unified | 5.0.0 | Per-operation error enum replaced by the unified error type. |
Rewarded ads
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | | 5.0.0 | Static generic load replaced by a type-specific instance-based load API. |
| 4.19.0 | | 5.0.0 | Two-method listener replaced by a single nullable-error callback that delivers the typed ad instance. |
| 4.19.0 | | 5.0.0 | Static show on the global class replaced by an instance method on the loaded ad object. |
| 4.19.0 | | 5.0.0 | Checking completion state for reward eligibility replaced by a dedicated reward callback. Note: |
| 4.19.0 | | 5.0.0 | Enum renamed for consistency; reward grant logic should use the dedicated |
Banner ads
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | | 5.0.0 | Direct view class replaced by an ad instance object whose view is accessed via a getter, consistent with the new ad object model. |
| 4.19.0 | Two separate listeners: | 5.0.0 | Single combined listener split into distinct load and show listeners. |
| 4.19.0 | | 5.0.0 | Constructor + separate load method replaced by a unified static load with a builder configuration, consistent with interstitial and rewarded. |
| 4.19.0 | | 5.0.0 | Renamed for namespace consistency; the new class also adds adaptive banner size support. |
| 4.19.0 | Unified | 5.0.0 | Banner-specific error types replaced by the unified error type used across all ad formats. |
| 4.19.0 | No replacement | 5.0.0 | Callback removed with no equivalent in the new |
Privacy
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | | 5.0.0 | String key-value privacy metadata replaced by a typed static method. |
| 4.19.0 | | 5.0.0 | String key-value privacy metadata replaced by a typed static method with explicit opt-out semantics. |
| 4.19.0 | | 5.0.0 | Privacy mode string replaced by an explicit boolean API for non-behavioral/contextual ad control. |
Error handling
API to be removed | Deprecated in version | What to use instead | Removed in version | Deprecation reason |
|---|---|---|---|---|
| 4.19.0 | Unified | 5.0.0 | Per-operation load error enum replaced by a unified error type with standardized numeric codes. |
| 4.19.0 | Unified | 5.0.0 | Per-operation show error enum replaced by a unified error type with standardized numeric codes. |
| 4.19.0 | Unified | 5.0.0 | Banner-specific error type replaced by the same unified error used across all ad formats. |