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.
@@ -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
 
@@ -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 < BannerAd > null;
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 three different types:
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)
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = exports.version = '15.4.0';
8
+ const version = exports.version = '15.4.1';
9
9
  //# sourceMappingURL=version.js.map
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '15.4.0';
2
+ export const version = '15.4.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "15.4.0";
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.0";
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.0",
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.0';
2
+ export const version = '15.4.1';