10 changed files with 44 additions and 113 deletions
@ -1,54 +1,26 @@ |
|||||
import React from "react" |
import React from "react" |
||||
import { View, StyleSheet, StatusBar, Text, Dimensions } from "react-native" |
import { View, StyleSheet, StatusBar, Text, Dimensions } from "react-native" |
||||
//import { AdMobBanner, AdMobInterstitial, PublisherBanner, AdMobRewarded } from "expo-ads-admob"
|
|
||||
|
|
||||
import { colors, texts, credentials } from "./Variables" |
import { colors, texts, credentials } from "./Variables" |
||||
|
|
||||
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads'; |
|
||||
|
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads' |
||||
|
const adUnitId = __DEV__ ? TestIds.INTERSTITIAL : 'ca-app-pub-4145771316565790~1876877627' |
||||
|
|
||||
const adUnitId = __DEV__ ? TestIds.INTERSTITIAL : 'ca-app-pub-4145771316565790~1876877627'; |
|
||||
/* |
|
||||
<BannerAd |
|
||||
unitId={adUnitId} |
|
||||
size={BannerAdSize.FULL_BANNER} |
|
||||
requestOptions={{ |
|
||||
requestNonPersonalizedAdsOnly: true, |
|
||||
}} |
|
||||
/> |
|
||||
*/ |
|
||||
const screen = Dimensions.get("window") |
const screen = Dimensions.get("window") |
||||
|
|
||||
const styles = StyleSheet.create({ |
const styles = StyleSheet.create({ |
||||
container: { |
container: { |
||||
backgroundColor: colors.yellow, |
|
||||
position: "absolute", |
|
||||
bottom: 0, |
|
||||
left: 0, |
|
||||
right: 0, |
|
||||
|
//backgroundColor: colors.yellow,
|
||||
flex: 1, |
flex: 1, |
||||
alignItems: "center", |
alignItems: "center", |
||||
justifyContent: "center" |
|
||||
}, |
|
||||
title: { |
|
||||
color: colors.white, |
|
||||
fontSize: 25, |
|
||||
textAlign: "center", |
|
||||
fontWeight: "600", |
|
||||
paddingVertical: 20 |
|
||||
}, |
|
||||
banner: { |
|
||||
width: "100%", |
|
||||
height: "100%", |
|
||||
|
justifyContent: "center", |
||||
marginVertical: 20 |
marginVertical: 20 |
||||
}, |
|
||||
|
} |
||||
}) |
}) |
||||
|
|
||||
export const Banner = () => { |
export const Banner = () => { |
||||
|
|
||||
return ( |
return ( |
||||
<View style={styles.container}> |
<View style={styles.container}> |
||||
<Text>BANNER...</Text> |
|
||||
|
|
||||
|
<BannerAd size={BannerAdSize.ADAPTIVE_BANNER} unitId={adUnitId} /> |
||||
</View> |
</View> |
||||
) |
) |
||||
} |
} |
||||
|
@ -1,6 +1,7 @@ |
|||||
module.exports = function(api) { |
module.exports = function(api) { |
||||
api.cache(true) |
api.cache(true) |
||||
return { |
return { |
||||
|
plugins: ['react-native-reanimated/plugin'], |
||||
presets: ['babel-preset-expo'] |
presets: ['babel-preset-expo'] |
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue