-
public class CloudXMain entry point for the CloudX SDK.
This object provides functions to initialize the SDK, create ad placements, configure logging, and manage user privacy settings.
-
-
Method Summary
Modifier and Type Method Description final static Unitinitialize(CloudXInitializationParams initParams, CloudXInitializationListener listener)Initializes the CloudX SDK. final static CloudXAdViewcreateBanner(String placementName)Creates a standard banner (320x50) ad view. final static CloudXAdViewcreateMREC(String placementName)Creates an MREC (300x250) ad view. final static CloudXInterstitialAdcreateInterstitial(String placementName)Creates an interstitial ad for displaying fullscreen non-rewarded ads. final static CloudXRewardedInterstitialAdcreateRewardedInterstitial(String placementName)Creates a rewarded interstitial ad for displaying fullscreen rewarded ads. final static UnitsetMinLogLevel(CloudXLogLevel minLogLevel)Sets the minimum log level for SDK logging output. final static UnitsetHashedUserId(String hashedUserId)Sets a hashed user identifier for ad targeting. final static UnitsetUserKeyValue(String key, String value)Sets a custom key-value pair for user-level targeting. final static UnitsetAppKeyValue(String key, String value)Sets a custom key-value pair for app-level targeting. final static UnitclearAllKeyValues()Clears all custom key-value pairs for both user and app-level targeting. final static Unitdeinitialize()Deinitializes the SDK and releases all resources. -
-
Method Detail
-
initialize
final static Unit initialize(CloudXInitializationParams initParams, CloudXInitializationListener listener)
Initializes the CloudX SDK. Must be called before loading or displaying any ads.
- Parameters:
initParams- Configuration parameters including the SDK key and test mode settings.listener- Optional callback to receive initialization success or failure events.
-
createBanner
final static CloudXAdView createBanner(String placementName)
Creates a standard banner (320x50) ad view.
- Parameters:
placementName- The placement name configured in the CloudX dashboard.
-
createMREC
final static CloudXAdView createMREC(String placementName)
Creates an MREC (300x250) ad view.
- Parameters:
placementName- The placement name configured in the CloudX dashboard.
-
createInterstitial
final static CloudXInterstitialAd createInterstitial(String placementName)
Creates an interstitial ad for displaying fullscreen non-rewarded ads.
- Parameters:
placementName- The placement name configured in the CloudX dashboard.
-
createRewardedInterstitial
final static CloudXRewardedInterstitialAd createRewardedInterstitial(String placementName)
Creates a rewarded interstitial ad for displaying fullscreen rewarded ads.
- Parameters:
placementName- The placement name configured in the CloudX dashboard.
-
setMinLogLevel
final static Unit setMinLogLevel(CloudXLogLevel minLogLevel)
Sets the minimum log level for SDK logging output. Use CloudXLogLevel.NONE to disable all logging.
- Parameters:
minLogLevel- The minimum CloudXLogLevel to display.
-
setHashedUserId
final static Unit setHashedUserId(String hashedUserId)
Sets a hashed user identifier for ad targeting.
- Parameters:
hashedUserId- A pre-hashed user identifier.
-
setUserKeyValue
final static Unit setUserKeyValue(String key, String value)
Sets a custom key-value pair for user-level targeting.
- Parameters:
key- The key identifier for the targeting parameter.value- The value associated with the key.
-
setAppKeyValue
final static Unit setAppKeyValue(String key, String value)
Sets a custom key-value pair for app-level targeting.
- Parameters:
key- The key identifier for the targeting parameter.value- The value associated with the key.
-
clearAllKeyValues
final static Unit clearAllKeyValues()
Clears all custom key-value pairs for both user and app-level targeting.
-
deinitialize
final static Unit deinitialize()
Deinitializes the SDK and releases all resources.
-
-
-
-