Skip to content

Commit

Permalink
Initialize the Google Mobile Ads SDK on a background thread
Browse files Browse the repository at this point in the history
  • Loading branch information
hig-dev committed Aug 30, 2024
1 parent e60f69e commit 516708a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 516708a

Please sign in to comment.