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 Flutter apps are implemented through native platform configurations. Since splash ads display before the Flutter engine fully initializes, they must be configured at the native Android and iOS level.Flutter apps use native splash screens that appear before Flutter 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
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.iOS Configuration
Step 1: Configure AppDelegate
Update yourios/Runner/AppDelegate.swift to display splash ads.
ios/Runner/AppDelegate.swift
Step 2: Configure SceneDelegate (iOS 13+)
For apps using SceneDelegate, updateios/Runner/SceneDelegate.swift.
ios/Runner/SceneDelegate.swift
Step 3: Add Logo Image
Add your app logo to the iOS assets:- Open Xcode and navigate to
Runner/Assets.xcassets - Add a new Image Set named
splash_logo - Add your logo images (@1x, @2x, @3x)
Step 4: Configure Info.plist (Optional)
If using SceneDelegate, ensure yourInfo.plist has the scene configuration:
ios/Runner/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.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 Flutter app
Not transitioning to Flutter app
- Verify
adrop_splash_ad_next_activityis set correctly (Android) - Check
onAdClosedelegate implementation (iOS) - Ensure FlutterViewController is 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 (Build > Clean Project > Rebuild)
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