| Property | Description | Type | Example | Default Value | |---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------------------------------------|-------------------------------------------------------------------------------------------------| | servePersonalizedAds | Whether personalized ads should be served by Admob | bool | false | false | | bannerSize | The banner size. These are from the expo-admob-ads sizes. | string | "banner" | "banner" | | bannerAdId | An object for the iOS and Android banner ad ids. If undefined then the banner ad will not be shown. When testing, only test ads will be shown. | object | { ios: "AD_ID", android: "AD_ID" } | undefined | | interstitialAdId | An object for the iOS and Android interstitial ad ids. If undefined then the interstitial ad will not be shown. When testing, only test ads will be shown. | object | { ios: "AD_ID", android: "AD_ID } | undefined | | ref | Adds a reference to your calling component to the AdView so you can call methods such as displayAd from your component. This can be seen in the example. | string | "adView" | undefined | | style | The style of the main View of the AdView. | object | | { flex: 1, backgroundColor: "#FFFFFF", alignItems: "center", justifyContent: "center" } | | scrollviewContentStyle | The style of the scrollview that the children of the AdView get displayed in. | object | | { flex: 1, alignSelf: "stretch" } | | scrollviewContentContainerStyle | The style of the scrollview's contentContainerStyle that the children of the AdView get displayed in. | object | | { alignItems: "center", justifyContent: "center" } |
AdView Methods
These internal methods may be accessed through a ref to the AdView.
displayAd() As shown in the example above, this displays an interstitial ad when called.
Suggestions?
Open Issues. Submit PRs.
Sample Application
The sample app is an Expo project. `sh cd ReactNativeAdmobAdsDemo npm install npm start ``