Documentation Index
Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
Use this file to discover all available pages before exploring further.
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+. Add the CloudX SDK to your app’s build.gradle:Initialization
Ad Formats
CloudX supports banner, MREC, interstitial, rewarded, and native 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 and Reels-style native video experiences.
Rewarded ads
Reward users after completed rewarded ad views.
Ad Information (CloudXAd)
TheCloudXAd object is passed to listener callbacks and contains information about the loaded/displayed ad:
| Property | Type | Description |
|---|---|---|
adFormat | CloudXAdFormat | Ad format (BANNER, MREC, INTERSTITIAL, REWARDED, NATIVE) |
adUnitId | String | The ad unit ID |
networkName | String | Name of the winning ad network |
networkPlacement | String? | Network-specific placement ID |
placement | String? | Custom placement set via setPlacement() |
revenue | Double | Bid-time revenue estimate in USD |
adValues | Map<String, String> | SDK-provided ad metadata, used by features such as Trusted Arbiter |
Error Handling
All SDK errors are returned asCloudXError objects in listener callbacks:
| Property | Type | Description |
|---|---|---|
code | CloudXErrorCode | Error category |
message | String | Human-readable description |
cause | Throwable? | Optional underlying exception |
formattedMessage | String | Pre-formatted message including code and description |
Error Code Categories
| Range | Category | Common Codes |
|---|---|---|
| 0 | General | INTERNAL_ERROR |
| 100-199 | Network | NETWORK_ERROR, NETWORK_TIMEOUT, NETWORK_SERVER_ERROR, NETWORK_NO_CONNECTION |
| 200-299 | Initialization | NOT_INITIALIZED, SDK_DISABLED, NO_ADAPTERS_FOUND, INVALID_APP_KEY |
| 300-399 | Ad Loading | NO_FILL, INVALID_AD_UNIT, ADS_DISABLED |
| 400-499 | Display | AD_NOT_READY, AD_ALREADY_SHOWING |
| 600-699 | Adapter | ADAPTER_NO_FILL, ADAPTER_TIMEOUT, ADAPTER_LOAD_TIMEOUT, ADAPTER_INITIALIZATION_ERROR |
Advanced Features
Debug Logging
VERBOSE < DEBUG < INFO < WARN < ERROR < NONE
Filter logcat with tag CloudX to see SDK logs.
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
| Key | Standard | Description |
|---|---|---|
IABGPP_HDR_GppString | GPP | Global Privacy Platform string (modern) |
IABGPP_GppSID | GPP | Section IDs (e.g., “2” for EU, “7” for US-National, “8” for US-CA) |
IABTCF_TCString | TCF v2 | GDPR consent string (legacy) |
IABTCF_gdprApplies | TCF v2 | Whether GDPR applies (1 = yes, 0 = no) |
IABUSPrivacy_String | US Privacy | CCPA privacy string (legacy, e.g., “1YNN”) |
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.