Overview
Splash ads are displayed on the splash screen when the app launches. The ad appears alongside your app logo, providing a natural user experience.Features
- Natural ad exposure at app launch
- Maintains brand image with app logo
- Fixed ad size: 360dp × 270dp (Android), 360px × 270px (iOS)
- Supports image ads
Use the test unit ID during development:
PUBLIC_TEST_UNIT_ID_SPLASHCaching Behavior
Splash ads are prefetched and cached on the device so the creative can appear instantly at launch, before any network request completes. On the next launch the cached creative is shown first, and a fresh ad request runs in the background to refresh the cache for subsequent launches.Implementation
Splash ads in React Native apps are implemented through native platform configurations. Since splash ads display before the React Native bridge fully initializes, they must be configured at the native Android and iOS level.React Native apps use native splash screens that appear before the JavaScript bundle loads. Adrop splash ads integrate with this native splash flow.
Android Configuration
Step 1: Configure strings.xml
Add the following settings toandroid/app/src/main/res/values/strings.xml.
android/app/src/main/res/values/strings.xml
Use
PUBLIC_TEST_UNIT_ID_SPLASH instead of YOUR_SPLASH_UNIT_ID for testing.Step 2: Add Splash Logo Image
Add your app logo to theandroid/app/src/main/res/drawable/ folder.
Step 3: Configure AndroidManifest.xml
SetAdropSplashAdActivity as the launcher activity.
android/app/src/main/AndroidManifest.xml
Step 4: Configure Splash Theme
Add or update the splash theme inandroid/app/src/main/res/values/styles.xml.
android/app/src/main/res/values/styles.xml
The
androidx.core:core-splashscreen dependency is included in the Adrop SDK. No additional setup is required.Step 5: Customize Layout (Optional)
To use a custom layout, createactivity_adrop_splash_ad.xml in android/app/src/main/res/layout/.
android/app/src/main/res/layout/activity_adrop_splash_ad.xml
Step 6: Configure Display Duration (Optional)
To change the default display duration, createandroid/app/src/main/res/values/integers.xml.
android/app/src/main/res/values/integers.xml
Step 7: Implement AdropSplashAd Listener (Optional)
To receive splash ad events, set up a listener in yourApplication class.
When
shouldSkip returns true, the ad is not loaded and navigates immediately to the main screen.Step 8: Running the App
When running the Android app with React Native CLI, you need to specify the main activity:This is required because
AdropSplashAdActivity is set as the launcher activity instead of MainActivity.iOS Configuration
Step 1: Configure AppDelegate
Update yourios/YourApp/AppDelegate.mm (or AppDelegate.swift) to display splash ads.
Step 2: Configure SceneDelegate (iOS 13+)
For apps using SceneDelegate, create or updateios/YourApp/SceneDelegate.swift.
ios/YourApp/SceneDelegate.swift
Step 3: Add Logo Image
Add your app logo to the iOS assets:- Open Xcode and navigate to
YourApp/Images.xcassets - Add a new Image Set named
splash_logo - Add your logo images (@1x, @2x, @3x)
Step 4: Configure Info.plist
If using SceneDelegate, ensure yourInfo.plist has the scene configuration:
ios/YourApp/Info.plist
AdropSplashAdDelegate
| Method | Required | Description |
|---|---|---|
onAdClose(_:impressed:) | Optional | Called when splash ad closes. impressed indicates if ad was displayed |
onAdReceived(_:) | Optional | Called when ad is received successfully |
onAdFailedToReceive(_:_:) | Optional | Called when ad fails to receive |
onAdImpression(_:) | Optional | Called when ad impression is recorded |
Best Practices
1. Set Appropriate Timers
Configure reasonable timeout values for better user experience.On iOS, the splash ad display duration is configured in the Adrop console ad unit settings.
2. Optimize Logo Image
Prepare your app logo in appropriate sizes to minimize loading time. Android:3. Handle Failures Gracefully
Ensure the app starts normally even when ad loading fails.4. Distinguish Test/Production Environments
Testing
Test Unit ID
Use the test unit ID during development.Troubleshooting
Splash screen is not displayed (Android)
Splash screen is not displayed (Android)
- Verify that
AdropSplashAdActivityis set as LAUNCHER in AndroidManifest.xml - Check
android:exported="true"setting - Verify SDK initialization is complete
- Ensure
adrop_service.jsonis in theandroid/app/src/main/assetsfolder
Splash screen is not displayed (iOS)
Splash screen is not displayed (iOS)
- Verify
window.rootViewControlleris set correctly - Check if SceneDelegate is configured in Info.plist
- Ensure SDK initialization is complete
- Verify
adrop_service.jsonis added to the Xcode project
Ad is not loading
Ad is not loading
- Check network connection status
- Verify the unit ID is correct
- Confirm
production: falsesetting in test environment - Check error code in
onAdFailedToReceive
Not transitioning to React Native app
Not transitioning to React Native app
- Verify
adrop_splash_ad_next_activityis set correctly (Android) - Check
onAdClosedelegate implementation (iOS) - Ensure RCTBridge and RCTRootView are created properly
Custom layout not applied (Android)
Custom layout not applied (Android)
- Verify filename is exactly
activity_adrop_splash_ad.xml - Check that ImageView with
@+id/adrop_splash_ad_imageexists - Clean build and re-run
Next Steps
Interstitial Ads
Display full-screen ads during screen transitions
Banner Ads
Implement banner ads
Native Ads
Custom design native ads
Rewarded Ads
Provide user rewards