react-native-google-mobile-ads 5.0.0 → 5.0.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.
@@ -117,7 +117,7 @@ public class ReactNativeGoogleMobileAdsModule extends ReactNativeModule {
117
117
  @ReactMethod
118
118
  public void initialize(Promise promise) {
119
119
  MobileAds.initialize(
120
- getContext(),
120
+ getApplicationContext(),
121
121
  new OnInitializationCompleteListener() {
122
122
  @Override
123
123
  public void onInitializationComplete(InitializationStatus initializationStatus) {
package/docs/index.mdx CHANGED
@@ -7,7 +7,7 @@ yarn add react-native-google-mobile-ads
7
7
 
8
8
  > On Android, before releasing your app, you must select _Yes, my app contains ads_ in the Google Play Store, Policy, App content, Manage under Ads.
9
9
 
10
- # What does it do
10
+ ## What does it do
11
11
 
12
12
  The AdMob module allows you to display adverts to your users. All adverts are served over the Google AdMob network, meaning
13
13
  a [Google AdMob account](https://apps.admob.com) is required.
@@ -21,7 +21,7 @@ The module supports three types of Ads:
21
21
  3. Full screen [Rewarded Ads](/displaying-ads#rewarded-ads).
22
22
  4. Component based [Banner Ads](/displaying-ads#banner-ads).
23
23
 
24
- # Getting Started
24
+ ## Getting Started
25
25
 
26
26
  A number of steps must be taken and considered before you start serving adverts to your users:
27
27
 
@@ -33,7 +33,7 @@ A number of steps must be taken and considered before you start serving adverts
33
33
  - [Test ads](#test-ads)
34
34
  - [Next Steps](#next-steps)
35
35
 
36
- ## Setting up Google AdMob
36
+ ### Setting up Google AdMob
37
37
 
38
38
  Before you are able to display ads to your users, you must have a [Google AdMob account](https://apps.admob.com). Under the
39
39
  "Apps" menu item, create or choose an existing Android/iOS app. Each app platform exposes a unique account ID which needs to
@@ -62,14 +62,14 @@ For the changes to take effect, rebuild your project:
62
62
 
63
63
  ```bash
64
64
  # For iOS
65
- cd ios/ && pod install
65
+ npx pod-install
66
66
  npx react-native run-ios
67
67
 
68
68
  # For Android
69
69
  npx react-native run-android
70
70
  ```
71
71
 
72
- ## Configure outbound requests
72
+ ### Configure outbound requests
73
73
 
74
74
  If the default ad settings are not correct for your app, you can provide settings that will apply to all ad requests.
75
75
 
@@ -103,7 +103,7 @@ mobileAds()
103
103
 
104
104
  To learn more about the request configuration settings, view the [`RequestConfiguration`](/reference/admob/requestconfiguration) documentation.
105
105
 
106
- ## Initialize the Google Mobile Ads SDK
106
+ ### Initialize the Google Mobile Ads SDK
107
107
 
108
108
  Before loading ads, have your app initialize the Google Mobile Ads SDK by calling `initialize` which initializes the SDK and returns a promise once initialization is complete (or after a 30-second timeout).
109
109
  This needs to be done only once, ideally at app launch.
@@ -123,7 +123,7 @@ mobileAds()
123
123
 
124
124
  If you are using mediation, you may wish to wait until the promise is settled before loading ads, as this will ensure that all mediation adapters are initialized.
125
125
 
126
- ## European User Consent
126
+ ### European User Consent
127
127
 
128
128
  Out of the box, AdMob does not handle any related regulations which you may need to enforce on your application.
129
129
  It is up to the developer to implement and handle this on a user-by-user basis. You must consent to EEA users
@@ -133,7 +133,7 @@ being served both personalized and non-personalized adverts before showing them.
133
133
  The AdMob module provides a `AdsConsent` helper to help developers quickly implement consent flows within their application.
134
134
  See the [European User Consent page](/european-user-consent) for full examples of how to integrate the helper into your application.
135
135
 
136
- ## Test ads
136
+ ### Test ads
137
137
 
138
138
  Whilst developing your app with AdMob, you'll want to make sure you use test ads rather than production ads from your
139
139
  Google AdMob account - otherwise your account may be disabled!
@@ -157,7 +157,7 @@ RewardedAd.createForAdRequest(TestIds.REWARDED);
157
157
  <BannerAd unitId={TestIds.BANNER} />
158
158
  ```
159
159
 
160
- # Next Steps
160
+ ## Next Steps
161
161
 
162
162
  Now the basics of setting up and configuring AdMob have been explained, we can go ahead and start to display different
163
163
  adverts to our users. The AdMob module provides integration with three different types:
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // generated by genversion
8
- const version = '5.0.0';
8
+ const version = '5.0.1';
9
9
  exports.version = version;
10
10
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["version.ts"],"names":["version"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '5.0.0';\n"]}
1
+ {"version":3,"sources":["version.ts"],"names":["version"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '5.0.1';\n"]}
@@ -1,3 +1,3 @@
1
1
  // generated by genversion
2
- export const version = '5.0.0';
2
+ export const version = '5.0.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["version.ts"],"names":["version"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '5.0.0';\n"]}
1
+ {"version":3,"sources":["version.ts"],"names":["version"],"mappings":"AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,OAAhB","sourcesContent":["// generated by genversion\nexport const version = '5.0.1';\n"]}
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "5.0.0";
1
+ export declare const SDK_VERSION = "5.0.1";
2
2
  export { default, MobileAds } from './MobileAds';
3
3
  export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
4
4
  export { AdsConsentStatus } from './AdsConsentStatus';
@@ -1 +1 @@
1
- export declare const version = "5.0.0";
1
+ export declare const version = "5.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-mobile-ads",
3
- "version": "5.0.0",
3
+ "version": "5.0.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 = '5.0.0';
2
+ export const version = '5.0.1';