Package 

Object CloudX


  • 
    public class CloudX
    
                        

    Main 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 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.
      • createNativeAdSmall

         final static CloudXAdView createNativeAdSmall(String placementName)

        Creates a small native ad view.

        Parameters:
        placementName - The placement name configured in the CloudX dashboard.
      • createNativeAdMedium

         final static CloudXAdView createNativeAdMedium(String placementName)

        Creates a medium native ad view.

        Parameters:
        placementName - The placement name configured in the CloudX dashboard.
      • setLoggingEnabled

         final static Unit setLoggingEnabled(Boolean isEnabled)

        Enables or disables SDK logging.

        Parameters:
        isEnabled - Set to true to enable logging, false to disable.
      • setPrivacy

         final static Unit setPrivacy(CloudXPrivacy privacy)

        Sets user privacy preferences for ad targeting.

        Parameters:
        privacy - The CloudXPrivacy object containing consent and privacy settings.
      • 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.