AdMob Integration
Implement Google AdMob in your Expo app
How to integrate AdMob in our React Native Expo App?
- Firstly, you need to make sure to have an AdMob account. If you donβt have one, you can create it here.
- Start the setup by following the steps below.
Setup
First, you need to install the react-native-google-mobile-ads
package.
Go to the admob.google.com and create your account.
You need to create the same app for iOS and Android.
Then pick a name for your app:
Now you need to create an ad unit for each type of ad.
You can choose a 4 category:
Banner
, Interstitial
, Rewarded
and App Open
.
Now you need to get your app ID for each platform.
Ad Unit Successfully Created.
Now, listen carefully to the following steps.
Open app.json
file and add the following code down below:
Go to services/admobConfig.ts
file and change the values with your own.
Go to services/admobService.ts
file and uncomment the code.
Now , go to app/_layout.tsx
file and add the following code down below:
Now you can use Ads in where you want in your app. For example:
Donβt forget to build your app again.
npx expo prebuild
or eas build --profile development --platform <platform>
Was this page helpful?