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

12 views
Skip to first unread message

Liran Barsisa

unread,
3:08 AM (3 hours ago) 3:08 AM
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.


Reply all
Reply to author
Forward
0 new messages