Admob optimize init and load

Is there a way we can use admob’s optimization of Initialization and Ad Loading? There is a checkbox in unity to allow for this, but i cant find any documentation here on if we can use it.
As per admob docs here

From my reading this can help greatly with fixes for admob related ANRs

Anyone have any idea?
Would this be as simple as adding this to the build settings in the applicationChildElements ???


            [[
            <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true"/>
            ]],
            [[
            <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true"/>
            ]],

Yes that should be all you need to do

Cool thanks @Scott_Harrison

Nice find. I’ll add these lines of code and include them in my next update.

That is great, but your app must use a minSdkVersion of 19 or higher to implemented it, and also that feature is still in Beta, so you will be optimizing your ads loading but your app may experiment some issues too.

Will this also work when using a mediation plugin like IronSource?

I’ve just put it into a build which uses Applovin Max for mediation. I haven’t rolled out the build to the public yet so can’t say whether it has any effect yet, but it doesn’t seem to cause any problems when adding it so I would suggest there is no harm in trying it out.

The mediation SDKs just use wrapped versions of the ad networks SDKS, so adding these lines to build.settings will in turn add them to AndroidManifest.xml which is where the ad network SDK will be looking for them. Both ironSource and Applovin Max are using versions of the Admob SDK which is higher than 21.0.0, so this should work on both.

Released 4 of my games with those options set and yes it does seem to work just fine without crashes

Does it also lead to a noticeable reduction in ANRs?

No ANRs are still the same at the moment.

Nothing will fix the ANR issue until Vlad separates the user interface (from a device perspective) from the main thread. Ad taking a while to load, user taps the app = ANR.