Automated Integration with Claude Code
Integrate CloudX SDK in 15 minutes with AI-powered agents: Requires Claude Code.- First-look CloudX with automatic fallback to existing ad setup
- Privacy compliance validation (GDPR, CCPA)
- Build verification catches errors early
- Preserves existing ad setup as backup
Manual Installation
Requires Android API 23+ and Java 8+. The CloudX SDK and its adapters are published to Maven Central (https://repo1.maven.org/maven2/). Make sure your project resolves from it in settings.gradle.kts:
Initialization
Ad Formats
CloudX supports banner, MREC, interstitial, rewarded, native, and App Open ad integrations. Use the format-specific guides for implementation details:Banner & MREC ads
Create fixed-size display placements with optional refresh control.
Interstitial ads
Load and show full-screen interstitial placements.
Native ads
Render native creatives in custom app layouts.
Rewarded ads
Reward users after completed rewarded ad views.
App Open ads
Show fullscreen ads at natural app-open or app-resume moments.
Ad Information (CloudXAd)
TheCloudXAd object is passed to listener callbacks and contains information about the loaded/displayed ad:
Error Handling
All SDK errors are returned asCloudXError objects in listener callbacks:
Error Code Categories
Advanced Features
Debug Logging
VERBOSE < DEBUG < INFO < WARN < ERROR < NONE
Filter logcat with tag CloudX to see SDK logs.
Publisher-Reported Revenue Data
If your app receives impression-level revenue callbacks or bid metadata from AdMob, InMobi, TopOn, or another mediation platform outside the CloudX ad flow, forward those events to CloudX after initialization:reportRevenueData() returns true when the event is accepted into the CloudX revenue pipeline. It returns false if the SDK is not initialized, server-side revenue tracking is disabled, or the platform name is blank. Acceptance is not a delivery guarantee.
AdMob paid events
AdMob AndroidAdValue.valueMicros is reported in micro-units of the supplied currency, so divide it by 1_000_000.0 before passing it to CloudX.
InMobi impression events
For InMobi, save theAdMetaInfo object from onAdFetchSuccessful. When onAdImpression fires, send the saved metaInfo.bid to CloudX, then clear the saved value.
InterstitialAdEventListener: save AdMetaInfo in onAdFetchSuccessful, then report it in onAdImpression.
TopOn revenue events
TopOn Android reports revenue inonAdRevenuePaid(ATAdInfo). Set an ATAdRevenueListener on the ad object and pass adInfo.getPublisherRevenue() directly to CloudX. Do not divide this value like AdMob micros or CPM.
adFormat.
Custom platform events
Usecustom for providers that do not have a CloudX SDK constant like AdMob, InMobi, and TopOn do. The value is only the provider name, such as CloudXRevenuePlatform.custom("TradPlus") or CloudXRevenuePlatform.custom("Nimbus"). Keep the name stable so CloudX can group that provider’s revenue consistently.
Do not include the amount or currency in the provider name. For a TradPlus impression worth USD 0.01, send platform = CloudXRevenuePlatform.custom("TradPlus"), revenue = 0.01, and .currencyCode("USD"). If your source reports CPM/eCPM, divide by 1_000.0 first.
Impression-Level Revenue Tracking
Set arevenueListener on any ad format to receive revenue callbacks. CloudXAd.revenue contains the bid-time USD estimate.
Test Mode
Test mode is server-controlled via device whitelisting. This provides better security and control over which devices receive test ads. To enable test mode:-
Initialize the SDK and check logcat for your device advertising ID:
- Copy the advertising ID and add it to your device whitelist on the CloudX server dashboard
- The SDK will automatically configure adapters for test mode and include the test flag in bid requests
Privacy Compliance
The CloudX SDK supports GDPR and CCPA privacy compliance by reading standard IAB privacy strings from SharedPreferences. These values are typically set automatically by your Consent Management Platform (CMP) such as Google UMP, OneTrust, or Sourcepoint.How It Works
The SDK automatically detects user location and reads consent signals:- EU Users (GDPR): Checks TCF v2 consent for purposes 1 and 2 per the IAB Global Vendor List and vendor consent (CloudX Vendor ID: 1510)
- US Users (CCPA): Checks for sale/sharing opt-out signals
- Other Regions: No restrictions applied
- Advertising ID (GAID) is cleared
- Geo coordinates (lat/lon) are removed
- User key-values are not sent
- Hashed user ID is excluded
Supported Privacy Keys
Note: The SDK prioritizes GPP (modern standard) over legacy TCF/US Privacy strings when both are available.
Manual Privacy API
If you manage user consent yourself (without a CMP), you can set GDPR and CCPA privacy status directly. These must be called prior to SDK initialization.When both manual values and CMP signals are present, CMP signals (GPP/TCF/US Privacy) take priority. Manual values act as a fallback when no CMP is integrated.