Frequently Asked Questions
This page answers common questions about the Nexad Android SDK.
General Questions
What is the Nexad Android SDK?
The Nexad Android SDK is a software development kit that allows Android app developers to integrate and display ads in their applications. It supports various ad formats including native ads, WebView-based ads, chat message ads, and modal overlay ads.
What are the system requirements?
- Android API Level 26 (Android 8.0) or higher
- Kotlin 1.8.20 or higher
- AndroidX compatibility
- Google Play Services (for Advertising ID)
How do I get access to the SDK?
Contact our sales team at [email protected] to get access to the SDK and receive your publisher ID and app ID.
Integration
How do I initialize the SDK?
Initialize the SDK in your Application class:
class YourApplication : Application() {
override fun onCreate() {
super.onCreate()
NexadSDK.initialize(
context = applicationContext,
appId = "YOUR_APP_ID",
publisherId = YOUR_PUBLISHER_ID,
publisherName = "YOUR_PUBLISHER_NAME",
publisherType = PublisherType.CHATBOT // or PublisherType.SEARCH_ENGINE
)
}
}
Do I need to add permissions to my AndroidManifest.xml?
Yes, you need to add the following permissions:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
How can I test the SDK in my app?
We provide test app IDs and ad placements for development. Use the following test credentials:
// Test app ID
val testAppId = "test_app_id"
// Test publisher ID
val testPublisherId = 123456789L
// Test placement IDs
val testNativePlacementId = "test_native"
val testWebViewPlacementId = "test_webview"
val testChatMessagePlacementId = "test_chat_message"
Ad Implementation
What ad formats are supported?
The SDK supports several ad formats:
- Native ads (text, image, or both)
- WebView-based ads (HTML content)
- Chat message ads (specifically designed for chat interfaces)
- Modal overlay ads (full-screen overlays)
How do I implement chat message ads?
val chatbotContext = ChatbotContext(
history = listOf(
"User: Can you recommend a good smartphone?",
"Bot: Sure, I can help with that. What's your budget?"
),
query = "I'm looking for a phone under $500 with good camera"
)
NexadSDK.getInstance().LoadChatMessageEmbedAd(
chatbotContext = chatbotContext,
callback = object : GenericUILoadCallback<View> {
override fun onSuccess(views: List<View>) {
for (view in views) {
chatContainer.addView(view)
}
}
override fun onFailure(error: Exception) {
Log.e("NexadSDK", "Failed to load chat message ad: ${error.message}")
}
}
)
How do I customize the appearance of ads?
Use the AdViewStyle class to customize the appearance:
val adStyle = AdViewStyle(
backgroundColor = Color.WHITE,
cornerRadius = 8f,
elevation = 4f,
padding = Padding(16f, 16f, 16f, 16f),
textStyle = TextStyle(
titleColor = Color.BLACK,
descriptionColor = Color.GRAY,
titleTextSize = 16f,
descriptionTextSize = 14f
)
)
// Apply to an individual ad view
adView.applyStyle(adStyle)
// Or set as global default
NexadSDK.getInstance().setDefaultAdViewStyle(adStyle)
Performance
How can I optimize ad loading performance?
- Use preloading for common placements:
NexadSDK.getInstance().preloadAd(
placement = "chat_message",
context = defaultChatContext,
count = 3
)
-
Implement proper error handling with retries.
-
Only load ads when they're needed (e.g., as the user approaches a part of the UI where ads will be displayed).
Will ads affect my app's performance?
The SDK is designed to have minimal impact on your app's performance. Ads are loaded asynchronously, and the SDK includes optimizations to minimize memory usage and CPU consumption.
Troubleshooting
No ads are being displayed
Check the following:
- Verify that you've initialized the SDK correctly
- Ensure you're using the correct app ID and publisher ID
- Check your internet connection
- Look for error messages in LogCat with the tag "NexadSDK"
- Verify that your ad placements are correctly configured
How do I handle ad loading failures?
Implement proper error handling in your callbacks:
override fun onFailure(error: Exception) {
when (error) {
is NetworkError -> Log.e("NexadSDK", "Network issue: ${error.message}")
is InvalidConfiguration -> Log.e("NexadSDK", "Config issue: ${error.message}")
is AdLoadError -> Log.e("NexadSDK", "Ad load error: ${error.message}")
else -> Log.e("NexadSDK", "Unknown error: ${error.message}")
}
// Show fallback content if needed
showFallbackContent()
}
I'm getting "No ad available" errors
This typically occurs when there are no ads available for your specific placement or targeting criteria. Try the following:
- Wait and try again later
- Check that your placement ID is correct
- Ensure your user targeting information is accurate
- Contact support if the issue persists
Monetization
How does the revenue model work?
The SDK supports various revenue models including:
- Cost per mille (CPM)
- Cost per click (CPC)
- Cost per action (CPA)
Your account manager will help you set up the most appropriate model for your app.
How can I track ad performance?
You can track ad performance through our dashboard at dashboard.nexad.io, which provides metrics such as:
- Impressions
- Clicks
- Click-through rate (CTR)
- Revenue
- Fill rate
How can I maximize my ad revenue?
- Strategically place ads in high-engagement areas of your app
- Implement multiple ad formats where appropriate
- Provide accurate user context for better targeting
- A/B test different ad placements and formats
- Regularly analyze performance metrics and optimize
Privacy and Compliance
Is the SDK GDPR compliant?
Yes, the SDK is designed to be GDPR compliant. It includes mechanisms for handling user consent and managing personal data in accordance with regulations.
How does the SDK handle user data?
The SDK collects minimal user data by default. You can control what user data is shared by configuring the NexadUser object. We recommend implementing user consent mechanisms in your app before sharing any personal data.
How can I implement user consent?
Implement user consent in your app before initializing the SDK:
// Only initialize the SDK after obtaining user consent
if (userConsentManager.hasUserConsent()) {
NexadSDK.initialize(
// SDK initialization parameters
)
// Set user data if consent for personalized ads is granted
if (userConsentManager.hasPersonalizedAdsConsent()) {
val userProfile = UserProfile(
// User profile data
)
NexadSDK.getInstance().setUser(NexadUser(
userId = userId,
deviceId = deviceId,
userProfile = userProfile
))
}
}
Support
How do I get help with the SDK?
If you have any questions or issues with the SDK, you can:
- Contact our support team at [email protected]
- Check our documentation at docs.nexad.io
- Join our developer community at community.nexad.io
How do I report a bug?
Please report bugs by sending an email to [email protected] with the following information:
- SDK version
- Android OS version
- Device model
- Steps to reproduce the issue
- LogCat output with the tag "NexadSDK"
- Screenshots or videos of the issue (if applicable)