Skip to content

Commit

Permalink
fix(android): use ApplicationContext so mediation adapter init works
Browse files Browse the repository at this point in the history
When delay_app_measurement_init set to true, mediation adapter may fail to init due to invalid context.
  • Loading branch information
tarouboy authored and mikehardy committed Apr 1, 2022
1 parent 77a6da3 commit d340943
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private RequestConfiguration buildRequestConfiguration(ReadableMap requestConfig
@ReactMethod
public void initialize(Promise promise) {
MobileAds.initialize(
getContext(),
getApplicationContext(),
new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {
Expand Down

0 comments on commit d340943

Please sign in to comment.