-
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) public abstract class CloudXAdapterMetadataProvider
Base class for ad network adapters to report their version metadata.
Implement this as a
@Keep object MetadataProviderin each adapter module. The SDK discovers implementations via reflection using the adapter package prefix.Called during config request construction — before adapter initialization — so the server can make informed decisions based on installed adapter versions.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringadapterVersionprivate final StringnetworkSdkVersionprivate final StringminimumSdkVersionprivate final IntegerminimumSdkVersionCodeprivate final IntegeradapterApiVersion
-
Constructor Summary
Constructors Constructor Description CloudXAdapterMetadataProvider()
-
Method Summary
Modifier and Type Method Description abstract StringgetAdapterVersion()Version of the adapter module (e.g., "2.1.0"). abstract StringgetNetworkSdkVersion()Version of the underlying ad network SDK (e.g., "11.0.1"). abstract StringgetMinimumSdkVersion()Minimum CloudX SDK artifact version this adapter expects at runtime. abstract IntegergetMinimumSdkVersionCode()Integer form of minimumSdkVersion, using the same encoding as SDK_VERSION_CODE. abstract IntegergetAdapterApiVersion()Adapter API version this adapter was compiled against. -
-
Method Detail
-
getAdapterVersion
abstract String getAdapterVersion()
Version of the adapter module (e.g., "2.1.0").
-
getNetworkSdkVersion
abstract String getNetworkSdkVersion()
Version of the underlying ad network SDK (e.g., "11.0.1").
-
getMinimumSdkVersion
abstract String getMinimumSdkVersion()
Minimum CloudX SDK artifact version this adapter expects at runtime.
This is a min-version requirement, not an exact match. Bump only when this adapter uses SDK API introduced in a newer CloudX SDK release.
-
getMinimumSdkVersionCode
abstract Integer getMinimumSdkVersionCode()
Integer form of minimumSdkVersion, using the same encoding as SDK_VERSION_CODE.
-
getAdapterApiVersion
abstract Integer getAdapterApiVersion()
Adapter API version this adapter was compiled against.
Only bumped on breaking changes to adapter-implemented contracts. The SDK checks this at runtime during adapter discovery — if it doesn't match io.cloudx.sdk.BuildConfig.ADAPTER_API_VERSION, the adapter is skipped.
Set this to io.cloudx.sdk.BuildConfig.ADAPTER_API_VERSION at compile time.
-
-
-
-