On the new Admob beta SDK, what happens if it takes too long to initialize?

82 views
Skip to first unread message

Liran Barsisa

unread,
Jan 20, 2026, 3:08:48 AMJan 20
to Google Mobile Ads SDK Developers
On the standard Admob SDK, I've asked in the past what happens if I request ads before MobileAds.initialize finishes:
https://groups.google.com/g/google-admob-ads-sdk/c/eXBFSPoUKf4
Dependency:
implementation("com.google.android.gms:play-services-ads:24.9.0")

Sadly I didn't get a response to this day there, so I tested it myself, and it still worked fine as to me it seems it used the adapters that were initialized so far, and if none were initialized it would at least use Admob.

This is important because sometimes it takes a huge amount of time for the callback of this function to end, because there are some adapters that take a long time to initialize in some cases.

Now on the new Admob beta SDK, it is required to call MobileAds.initialize before all ad requests:
https://developers.google.com/admob/android/next-gen/migration

Dependency:
    implementation("com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:0.22.0-beta04")
    configurations.configureEach {
        exclude(group = "com.google.android.gms", module = "play-services-ads")
        exclude(group = "com.google.android.gms", module = "play-services-ads-lite")
    }

I want to ask if it's still ok to use the same tactic, that if I see that it takes some time to initialize, I just start loading, if again something makes the initialization takes too much time, it's bad to wait for it to finish, either to wait for the callback or as in the current snippet to wait for the function to finish.


Mobile Ads SDK Forum Advisor

unread,
Jan 20, 2026, 9:30:06 AMJan 20
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Thank you for reaching out to the Mobile Ads Support team.

Regarding your question about requesting ads before MobileAds.initialize() with the Next-Gen AdMob SDK, here’s the key information:

Old SDK Behavior:

  • In the legacy Google Mobile Ads SDK, ad requests sometimes worked even if initialization wasn’t finished.
  • This behavior was never guaranteed and could fail silently in some cases.

Next-Gen SDK Requirement:

  • With the Next-Gen SDK, all ad requests must be made only after MobileAds.initialize() completes.
  • Requests made before initialization may fail or behave unpredictably.

Recommended Approach:

  • Call MobileAds.initialize() as early as possible.
  • Use the initialization callback to know when the SDK is ready, then safely load ads.
  • Do not block the UI; you can load ads asynchronously after initialization.

For your reference, here is a sample project using the Next-Gen AdMob SDK

Next-Gen AdMob SDK Android Examples


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2026-01-20 14:29:08Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01woIED:ref" (ADR-00349818)



Message has been deleted

Liran Barsisa

unread,
Jan 20, 2026, 11:02:55 AMJan 20
to Google Mobile Ads SDK Developers
About old behavior, I can't confirm. My tests showed that if it took a huge amount of time till the callback is called, and I request ads, it worked fine.
The reason is that after the MobileAds.initialize is called, it means that at least Admob is initialized.
You wrote me this:
"The ad-request would generally use only the ad networks that have been fully initialized and are ready to serve ads. So, if only AdMob was initialized, the ad-request would typically only use AdMob for serving ads unless you have a mediation setup in place.  "

Also, on the docs even of the new SDK , it says:
"When this method returns, the SDK is ready to accept requests but not all 3P SDKs may be ready yet"

So, if I wait at least for this function to end and have some timeout of my own to decide "OK the other ad-networks are terrible right now so let's use what we have", I should be able to do it.

Even on your new sample, I can see that you don't wait for the callback of MobileAds.initialize, as you start requesting ads right after this function finishes:
https://github.com/googleads/gma-next-gen-sdk-android-examples/blob/df6cb62848cd295d28e886a83fa51de84ac7c661/kotlin/NextGenExample/app/src/main/java/com/example/next_gen_example/SplashActivity.kt#L141

Look at the code there:

    backgroundScope.launch {
      // Initialize the Google Mobile Ads SDK on a background thread.
      MobileAds.initialize(
        this@SplashActivity,
        // Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713
        InitializationConfig.Builder(APP_ID).build(),
      ) {
        // Adapter initialization is complete.
      }

      // Set your test devices.
      MobileAds.setRequestConfiguration(
        RequestConfiguration.Builder()
          .setTestDeviceIds(listOf(Constant.TEST_DEVICE_HASHED_ID))
          .build()
      )

      if (googleMobileAdsConsentManager.canRequestAds) {
        // Load an app open ad when Mobile Ads SDK initialization is complete.
        AppOpenAdManager.loadAd(this@SplashActivity)
      }
    }

If I had done what you are saying, of "Use the initialization callback to know when the SDK is ready, then safely load ads" , it means the new SDK became worse than before, as I would have to wait for all adapters to finish, including the case that I've reported you in the past that sometimes some ad-network adapters take a huge amount of time to initialize:
https://github.com/googleads/googleads-mobile-android-mediation/issues/552

This is information I've gathered myself via Analytics and Crashlytics. 
Please, it's a good chance to improve the API of this, to improve how it works, as I've requested in the past, that the callback would be progressive, so that it will be called multiple times and tell us which adapters (including Admob itself) are done with initialization and we could decide if it's good enough to start requesting ads from this moment.
What's the point in calling MobileAds.initialize in background thread and have a callback there too? You could have it being called on the UI thread as all ad-requests are done on the UI thread, being queued till we tell them they are ready, or automatically start after all ad-networks (including Admob) are ready. The callback could tell us about each of the ad-networks instead of all-or-nothing. I requested it here, including explanation and statistics of why this is important:
https://groups.google.com/g/google-admob-ads-sdk/c/iU3Bba_WNDE

As for "Call MobileAds.initialize() as early as possible", sadly that's impossible as you also have it in your own sample, because we need the UMP SDK to finish first.

So, I ask again:
1. What happens if it takes too long to initialize (either of Admob or of any adapter of other ad networks)? I don't want to wait minutes or hours for the callback. Even 4 seconds is a lot.
2. Can I avoid waiting for all adapters to initialize, just as you even have on your own sample, and start requesting ads after MobileAds.initialize just finished?
3. Can you please make things better and not worse, meaning that even if some adapter is faster than Admob (or Admob fails to initialize), we will know about it, and be able to decide if we want to start requesting ads from this point, using all ad-networks that succeeded to initialize so far?
4. What should I do when even MobileAds.initialize function itself takes too long, or even throws an exception? I want to use what was initialized so far, or at least try to.

Mobile Ads SDK Forum Advisor

unread,
Jan 20, 2026, 4:35:03 PMJan 20
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for getting back to us.

Please find the below answers to your questions: 

1. What happens if it takes too long to initialize (either of Admob or of any adapter of other ad networks)? I don't want to wait minutes or hours for the callback. Even 4 seconds is a lot.

Ans: If initialization takes a long time, it does not block ad loading as long as MobileAds.initialize() has returned. You can request ads immediately. AdMob and any adapters that are ready will serve ads. You do not need to wait minutes, seconds, or for the callback.

2. Can I avoid waiting for all adapters to initialize, just as you even have on your own sample, and start requesting ads after MobileAds.initialize just finished?

Ans: Yes, you can start requesting ads as soon as MobileAds.initialize() finishes. This is supported behavior and is exactly what the official Google sample does. 

3. Can you please make things better and not worse, meaning that even if some adapter is faster than Admob (or Admob fails to initialize), we will know about it, and be able to decide if we want to start requesting ads from this point, using all ad-networks that succeeded to initialize so far?

Ans: No, with the current SDK you cannot know which adapters are ready or get progressive updates. The SDK only gives you an all-or-nothing callback. Your request for adapter-level or progressive initialization is reasonable, but it is not supported today.

4. What should I do when even MobileAds.initialize function itself takes too long, or even throws an exception? I want to use what was initialized so far, or at least try to.

Ans: If MobileAds.initialize() itself is slow or throws an exception, you should catch the exception, log it, and still attempt to load ads. 


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2026-01-20 21:34:13Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01woIED:ref" (ADR-00349818)



Liran Barsisa

unread,
Jan 20, 2026, 5:05:13 PMJan 20
to Google Mobile Ads SDK Developers
1. OK but please fix this issue, that it can take a long time for adapters. Use something like Analytics to track how long it takes them.
2. So it's as before, then. You wrote the opposite, that "Use the initialization callback to know when the SDK is ready, then safely load ads".
3. Please add loading callback that doesn't do all-or-nothing. Some ad-networks are more important than others. Surely each time an adapter tells Admob mediation that it's done, you have a real callback to it, because I can see that it says how long it took for each.
4. So this is still ok too, despite the docs.
Reply all
Reply to author
Forward
0 new messages