CloudX Android SDK
A powerful Android SDK for maximizing ad revenue through intelligent ad mediation across multiple ad networks. The CloudX SDK helps developers efficiently manage and optimize their ad inventory to ensure the highest possible returns.Features
- Multiple Ad Formats: Banner, Interstitial, and MREC ads
- Intelligent Mediation: Automatic optimization across multiple ad networks
- Real-time Bidding: Advanced bidding technology for maximum revenue
- Comprehensive Analytics: Detailed reporting and performance metrics
- Easy Integration: Simple API with comprehensive listener callbacks
- Privacy Compliance: Built-in GDPR, CCPA, and COPPA support
- Revenue Transparency: Publisher revenue reporting for optimization
Integration Options
π€ Automated Integration with Claude Code (Recommended)
Integrate CloudX SDK in 20 minutes with AI-powered agents:- β First-look CloudX with automatic fallback
- β Privacy compliance validation (GDPR, CCPA, COPPA)
- β Build verification catches errors early
- β Preserves existing ad setup as backup
π Manual Integration
Follow the traditional integration steps below if you prefer manual setup.Requirements
- Android: API 21 (Android 5.0) or later
- Target SDK: API 35 recommended
- Kotlin: 1.9.0+ (built with 1.9.22)
- Java: Compatible with Java 8+ projects
- Gradle: 8.0+ with Android Gradle Plugin 8.0+
Dependencies
The CloudX SDK uses the following key dependencies that may affect compatibility:- Ktor: 2.3.8 (HTTP client library using Android engine)
- Kotlinx Coroutines: 1.7.3
Required Permissions
Add these permissions to yourAndroidManifest.xml:
Installation
Gradle (Recommended)
- Add Maven Central to your
settings.gradleorsettings.gradle.kts:
- Add the CloudX SDK to your appβs
build.gradleorbuild.gradle.kts:
- Sync your project in Android Studio.
Quick Start
1. Initialize the SDK
Kotlin:2. Enable Debug Logging (Optional)
Kotlin:Ad Integration
Banner Ads
Banner ads are rectangular ads that appear at the top or bottom of the screen. Kotlin:Interstitial Ads
Interstitial ads are full-screen ads that appear between app content. Kotlin:Advanced Features
Privacy Compliance & GDPR Integration
The CloudX SDK supports privacy compliance for GDPR, CCPA, and COPPA regulations. Publishers are responsible for obtaining consent through their Consent Management Platform (CMP) and providing the privacy signals to our SDK. Kotlin:Privacy Keys Reference
| Key | Type | Description |
|---|---|---|
IABTCF_TCString | String | GDPR TC String from your CMP |
IABTCF_gdprApplies | Integer | Whether GDPR applies (1 = yes, 0 = no) |
IABUSPrivacy_String | String | CCPA privacy string (e.g., β1YNNβ) |
IABGPP_HDR_GppString | String | Global Privacy Platform string |
IABGPP_GppSID | String | GPP Section IDs |
User Targeting
Kotlin:Test Mode Configuration
Enable test mode for supported ad networks: Kotlin:API Reference
Core Methods
| Method | Description |
|---|---|
CloudX.initialize(params, listener) | Initialize SDK with parameters and listener |
CloudX.setPrivacy(privacy) | Set privacy preferences |
CloudX.setLoggingEnabled(enabled) | Enable/disable SDK logging |
CloudX.setMinLogLevel(level) | Set minimum log level |
Ad Creation Methods
| Method | Description |
|---|---|
CloudX.createBanner(placement) | Create banner ad (320x50) |
CloudX.createMREC(placement) | Create MREC ad (300x250) |
CloudX.createInterstitial(placement) | Create interstitial ad |
User Targeting Methods
| Method | Description |
|---|---|
CloudX.setHashedUserId(hashedId) | Set hashed user ID |
CloudX.setUserKeyValue(key, value) | Set user key-value pair |
CloudX.setAppKeyValue(key, value) | Set app key-value pair |
CloudX.clearAllKeyValues() | Clear all custom key-values |
Ad Control Methods
| Method | Description |
|---|---|
load() | Load ad content (interstitial only) |
show() | Show fullscreen ad (interstitial only) |
isAdReady | Check if fullscreen ad is ready |
destroy() | Destroy ad and release resources |
listener | Property to set ad event listener |
Listener Callbacks
All ad types support these common callbacks:onAdLoaded(ad)- Ad loaded successfullyonAdLoadFailed(error)- Ad failed to loadonAdDisplayed(ad)- Ad was shownonAdDisplayFailed(error)- Ad failed to showonAdHidden(ad)- Ad was hiddenonAdClicked(ad)- Ad was clicked
onAdExpanded(ad)- Ad was expandedonAdCollapsed(ad)- Ad was collapsed
Troubleshooting
Common Issues
-
SDK not initialized
- Ensure you call
CloudX.initialize()before creating ads - Check that the
onInitialized()callback is called successfully
- Ensure you call
-
Ads not loading
- Verify your placement names are correct
- Check network connectivity
- Ensure youβre testing on a real device (not emulator for some networks)
-
Listener methods not called
- Verify your activity/fragment implements the correct listener interface
- Ensure the listener is set when creating ads
-
Build errors
- Make sure youβre using Android API 21 or later
- Verify all required dependencies are included
- Check that youβre using compatible Kotlin/Gradle versions
Debug Logging
Enable debug logging to troubleshoot issues: Kotlin:Support
- Documentation: CloudX Android SDK Docs
- Changelog: CHANGELOG.md
- Issues: GitHub Issues
- Email: mobile@cloudx.io