Skip to content

Commit

Permalink
Opportunistically use currentactivity
Browse files Browse the repository at this point in the history
Required for Unity Ads to function, as far as I can see shouldn't effect anything else
  • Loading branch information
TaylorDale authored Dec 1, 2024
1 parent 2aa29f0 commit 1a1a778
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ReactNativeGoogleMobileAdsModule(
@ReactMethod
fun initialize(promise: Promise) {
MobileAds.initialize(
reactApplicationContext,
currentActivity ?: reactApplicationContext,
OnInitializationCompleteListener { initializationStatus ->
val result = Arguments.createArray()
for ((key, value) in initializationStatus.adapterStatusMap) {
Expand Down

0 comments on commit 1a1a778

Please sign in to comment.