-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call MobileAds.initialize
on background thread
#1135
Comments
Hi @blaugold, thanks for flagging. I've shared this with engineering to determine next steps. |
Is there any workaround we can do on the flutter side while this lib is not updated? Can we call |
I saw that this is implemented on all the examples folders: <meta-data
android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING"
android:value="true" /> 5, 6, 7 e 8 is the same thing... This shouldn't be added into the plugin android manifest too ? |
Hi @marcellocamara, those flags are optional. They are needed if you're not calling |
This has been resolved in #1179 and will be included in the next release |
@LTPhantom thanks updatethanks, resolved |
The Google Ads team now recommends calling
MobileAds.initialize
on a background thread to avoid ANRs.Currently, this Plugin calls
MobileAds.initialize
on the UI thread.googleads-mobile-flutter/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/GoogleMobileAdsPlugin.java
Line 349 in 8e0834e
googleads-mobile-flutter/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java
Line 39 in 8e0834e
The text was updated successfully, but these errors were encountered: