Android Frequently Asked Questions
Overview
This document summarizes common issues and solutions when using UJU Android SDK, helping developers quickly troubleshoot and resolve problems.
Ad Loading and Display
Q: Why isn't the ad displaying?
A: Possible reasons and solutions:
Network connection issues
- Check if the device network connection is normal
- Try switching network types (Wi-Fi/mobile network)
- Check if the firewall is blocking network requests
Ad unit ID error
- Confirm if the ad unit ID is correct
- Check if the ad unit ID is correctly configured in UJU backend
- Ensure you're using the correct ad unit ID for the corresponding platform (Android/iOS)
SDK initialization issues
- Confirm if the SDK is correctly initialized
- Check if App ID and App Key are correct
- Check if the initialization callback returns success
Insufficient ad inventory
- Try using other types of ads
- Check if ad network configuration is correct
- Try again later, ad inventory may fluctuate
Test device issues
- Confirm if the test device ID has been added to the test device list
- Check if test mode is correctly enabled
- Try using a different test device
Q: What to do if ad loading fails with error code?
A: Refer to the Error Codes document to understand the specific error reason and solution.
Q: How to improve ad fill rate?
A: Recommendations for improving ad fill rate:
Integrate multiple ad networks
- Integrate both domestic and overseas ad networks
- Reasonably configure ad source priority
Optimize ad loading strategy
- Load ads in advance, use preloading strategy
- Implement ad caching mechanism
- Set reasonable ad refresh intervals
Improve app quality
- Optimize app user experience
- Increase app user activity
- Increase app downloads and user base
Compliance operation
- Ensure the app complies with each ad network's policy requirements
- Avoid fake traffic and invalid clicks
- Maintain a good ad display environment
SDK Integration and Configuration
Q: What to do if SDK initialization fails?
A: Possible reasons and solutions:
Network issues
- Check if network connection is normal
- Confirm the device can access UJU servers
App ID/Key error
- Confirm if App ID and App Key are correct
- Check if you're using the correct app credentials
Permission issues
- Confirm the app has obtained necessary permissions
- Check permission configuration in AndroidManifest.xml
Version compatibility
- Confirm SDK version is compatible with Android system version
- Check if dependency library versions conflict
Q: How to add test devices?
A: Methods to add test devices:
Add through code
java// Add test device before initializing SDK UJUAd.addTestDevice("YOUR_TEST_DEVICE_ID");Get test device ID through logs
- Run the app and check logs
- When ad loading fails, the test device ID will be displayed in the logs
- Copy the ID and add it to the test device list
Get through settings
javaString testDeviceId = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID); Log.d("TestDeviceID", "Device ID: " + testDeviceId);
Q: How to enable debug mode?
A: Method to enable debug mode:
// Enable debug mode when initializing SDK
UJUAdConfig config = new UJUAdConfig.Builder()
.setAppId("YOUR_APP_ID")
.setAppKey("YOUR_APP_KEY")
.setDebugMode(true) // Enable debug mode
.build();
UJUAd.init(this, config, new InitCallback() {
// Callback methods
});Performance and Optimization
Q: Does ad loading affect app performance?
A: Ad loading may have some impact on app performance, recommendations:
Optimize loading timing
- Load ads when the app is idle
- Avoid loading ads during frequent user interactions
- Use asynchronous loading to avoid blocking the main thread
Memory management
- Timely destroy ad instances that are no longer used
- Avoid memory leaks
- Monitor app memory usage
Network optimization
- Implement network status detection
- Reduce ad requests when network conditions are poor
- Implement ad caching mechanism
Q: How to optimize ad loading speed?
A: Recommendations for optimizing ad loading speed:
Preloading strategy
- Preload ads at app startup
- Load ads in advance before users might need them
- Implement ad preloading queue
Caching mechanism
- Implement ad content caching
- Cache ad materials and resources
- Reduce duplicate network requests
Network optimization
- Use CDN to accelerate ad resource loading
- Implement intelligent network selection
- Optimize network request parameters
Code optimization
- Reduce main thread blocking
- Optimize ad rendering logic
- Use efficient data structures
Revenue and Monetization
Q: How to improve ad revenue?
A: Recommendations for improving ad revenue:
Ad type selection
- Rewarded video ads: Highest revenue, recommended for priority use
- Interstitial ads: High revenue, suitable for display during user operation gaps
- Native ads: Good user experience, suitable for integration with app content
- Banner ads: Continuous display, suitable for long-term monetization
Ad placement optimization
- Choose locations with high user activity
- Ensure ad locations are prominent but not disruptive to user experience
- Test ad performance in different locations
Ad display strategy
- Set reasonable ad display frequency
- Avoid over-displaying ads
- Implement intelligent ad display strategy
User targeting
- Provide accurate user information
- Implement user segmentation and targeted delivery
- Optimize ad targeting parameters
Q: How is ad revenue calculated?
A: Ad revenue calculation methods:
CPM (Cost Per Mille)
- Revenue per thousand impressions
- Calculation formula: CPM = (Total Revenue / Impressions) × 1000
CPC (Cost Per Click)
- Revenue per click
- Calculation formula: CPC = Total Revenue / Clicks
CPA (Cost Per Action)
- Revenue per action
- Calculation formula: CPA = Total Revenue / Actions
Hybrid billing
- Depending on ad type and ad network, hybrid billing methods may be used
- Specific billing methods are subject to UJU backend configuration
Q: How to view ad revenue data?
A: Methods to view ad revenue data:
UJU backend
- Log in to UJU developer backend
- Enter App Management → Data Analysis
- View detailed revenue data and reports
SDK callbacks
- Get ad impression and click events through ad listeners
- Implement custom statistics logic
- Integrate with your app's data analysis system
Policy and Compliance
Q: What compliance issues need to be considered for ad display?
A: Ad compliance considerations:
Ad identification
- Ensure ads have clear identification
- Avoid confusion between ads and app content
- Add ad identification according to each ad network's requirements
User experience
- Avoid excessive user interruption
- Ensure ads do not affect core app functions
- Provide options to skip ads
Content compliance
- Ensure ad content complies with laws and regulations
- Avoid displaying illegal ads
- Regularly check ad content
Data compliance
- Comply with user data privacy protection regulations
- Obtain explicit user authorization
- Reasonably use user data
Q: How to avoid ads being considered invalid clicks?
A: Recommendations to avoid invalid clicks:
Development phase
- Use test ad unit IDs
- Enable test mode
- Avoid generating real clicks on development devices
Production environment
- Educate users not to maliciously click on ads
- Avoid adding code that automatically clicks on ads in the app
- Reasonably set ad display positions to avoid accidental clicks
Monitoring and optimization
- Monitor click data to detect anomalies in time
- Analyze click behavior and optimize ad display strategy
- Maintain communication with the UJU team
Technical Support
Q: How to get technical support when encountering issues?
A: Methods to get technical support:
Official documentation
- Check Development Documentation for detailed integration guides
- Refer to API Documentation to understand SDK usage
Technical support
- Send email to marco@ujuad.com
- Submit a ticket in UJU backend
- Join the developer communication group for real-time support
Community resources
- View common questions and solutions
- Participate in developer community discussions
- Share and gain development experience
Q: How to update SDK version?
A: Methods to update SDK version:
Check changelog
- Check Changelog to understand version changes
- Confirm if the new version resolves the issues you encountered
- Learn about new features and improvements in the new version
Update dependencies
- Update SDK version in build.gradle file
- Sync project dependencies
- Rebuild the app
Testing and verification
- Verify the new version in a test environment
- Ensure all ad functions work normally
- Check if there are API changes that need adaptation
