react-native-google-mobile-ads 15.4.0 → 15.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt +4 -4
- package/docs/displaying-ads.mdx +1 -1
- package/docs/index.mdx +3 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsModule.kt
CHANGED
|
@@ -111,7 +111,7 @@ class ReactNativeGoogleMobileAdsModule(
|
|
|
111
111
|
// it is not clear if that will cause problems even if it happens, but users that have widely deployed this
|
|
112
112
|
// with the use of currentActivity have not seen problems
|
|
113
113
|
// reference if it needs attention: https://github.com/invertase/react-native-google-mobile-ads/pull/664
|
|
114
|
-
currentActivity ?: reactApplicationContext,
|
|
114
|
+
reactApplicationContext.currentActivity ?: reactApplicationContext,
|
|
115
115
|
OnInitializationCompleteListener { initializationStatus ->
|
|
116
116
|
val result = Arguments.createArray()
|
|
117
117
|
for ((key, value) in initializationStatus.adapterStatusMap) {
|
|
@@ -136,7 +136,7 @@ class ReactNativeGoogleMobileAdsModule(
|
|
|
136
136
|
|
|
137
137
|
@ReactMethod
|
|
138
138
|
fun openAdInspector(promise: Promise) {
|
|
139
|
-
val activity = currentActivity
|
|
139
|
+
val activity = reactApplicationContext.currentActivity
|
|
140
140
|
if (activity == null) {
|
|
141
141
|
promise.reject("null-activity", "Ad Inspector attempted to open but the current Activity was null.")
|
|
142
142
|
return
|
|
@@ -164,8 +164,8 @@ class ReactNativeGoogleMobileAdsModule(
|
|
|
164
164
|
|
|
165
165
|
@ReactMethod
|
|
166
166
|
fun openDebugMenu(adUnit: String) {
|
|
167
|
-
currentActivity?.runOnUiThread {
|
|
168
|
-
MobileAds.openDebugMenu(currentActivity!!, adUnit)
|
|
167
|
+
reactApplicationContext.currentActivity?.runOnUiThread {
|
|
168
|
+
MobileAds.openDebugMenu(reactApplicationContext.currentActivity!!, adUnit)
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
package/docs/displaying-ads.mdx
CHANGED
|
@@ -423,7 +423,7 @@ import { BannerAd, BannerAdSize, TestIds, useForeground } from 'react-native-goo
|
|
|
423
423
|
const adUnitId = __DEV__ ? TestIds.ADAPTIVE_BANNER : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy';
|
|
424
424
|
|
|
425
425
|
function App() {
|
|
426
|
-
const bannerRef = useRef
|
|
426
|
+
const bannerRef = useRef<BannerAd>(null);
|
|
427
427
|
|
|
428
428
|
// (iOS) WKWebView can terminate if app is in a "suspended state", resulting in an empty banner when app returns to foreground.
|
|
429
429
|
// Therefore it's advised to "manually" request a new ad when the app is foregrounded (https://groups.google.com/g/google-admob-ads-sdk/c/rwBpqOUr8m8).
|
package/docs/index.mdx
CHANGED
|
@@ -496,9 +496,11 @@ RewardedAd.createForAdRequest(TestIds.REWARDED);
|
|
|
496
496
|
## Next Steps
|
|
497
497
|
|
|
498
498
|
Now the basics of setting up and configuring AdMob have been explained, we can go ahead and start to display different
|
|
499
|
-
adverts to our users. The AdMob module provides integration with
|
|
499
|
+
adverts to our users. The AdMob module provides integration with six different types:
|
|
500
500
|
|
|
501
501
|
- [App Open Ads](/displaying-ads#app-open-ads)
|
|
502
502
|
- [Interstitial Ads](/displaying-ads#interstitial-ads)
|
|
503
503
|
- [Rewarded Ads](/displaying-ads#rewarded-ads)
|
|
504
504
|
- [Banner Ads](/displaying-ads#banner-ads-component)
|
|
505
|
+
- [Rewarded Interstitial Ads](/displaying-ads#rewarded-interstitial-ads)
|
|
506
|
+
- [Native Ads](/native-ads)
|
package/lib/commonjs/version.js
CHANGED
package/lib/module/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "15.4.
|
|
1
|
+
export declare const SDK_VERSION = "15.4.1";
|
|
2
2
|
export { default, MobileAds } from './MobileAds';
|
|
3
3
|
export { AdsConsentDebugGeography, AdsConsentInfo, AdsConsentInfoOptions, AdsConsentInterface, AdsConsentPrivacyOptionsRequirementStatus, AdsConsentStatus, AdsConsentUserChoices, } from './specs/modules/NativeConsentModule';
|
|
4
4
|
export { AdsConsentPurposes } from './AdsConsentPurposes';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "15.4.
|
|
1
|
+
export declare const version = "15.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-mobile-ads",
|
|
3
|
-
"version": "15.4.
|
|
3
|
+
"version": "15.4.1",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '15.4.
|
|
2
|
+
export const version = '15.4.1';
|