Skip to content

Commit

Permalink
MobileAds.init from a Background thread (#1179)
Browse files Browse the repository at this point in the history
* MobileAds.init from a Background thread

* Update Mediation sample Podfile
  • Loading branch information
LTPhantom authored Oct 3, 2024
1 parent 5fe5821 commit b63c671
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ public FlutterMobileAdsWrapper() {}
/** Initializes the sdk. */
public void initialize(
@NonNull Context context, @NonNull OnInitializationCompleteListener listener) {
MobileAds.initialize(context, listener);
new Thread(
new Runnable() {
@Override
public void run() {
MobileAds.initialize(context, listener);
}
})
.start();
}

/** Wrapper for setAppMuted. */
Expand Down
2 changes: 1 addition & 1 deletion samples/admob/mediation_example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ post_install do |installer|
end
end

pod 'GoogleMobileAdsMediationAppLovin'
pod 'GoogleMobileAdsMediationAppLovin', '< 13.0.0.0'

0 comments on commit b63c671

Please sign in to comment.