diff --git a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java index d8d9d65c7..9121c53ee 100644 --- a/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java +++ b/packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/FlutterMobileAdsWrapper.java @@ -36,7 +36,12 @@ public FlutterMobileAdsWrapper() {} /** Initializes the sdk. */ public void initialize( @NonNull Context context, @NonNull OnInitializationCompleteListener listener) { - MobileAds.initialize(context, listener); + new Thread( + () -> { + // Initialize the Google Mobile Ads SDK on a background thread. + MobileAds.initialize(context, listener); + }) + .start(); } /** Wrapper for setAppMuted. */