Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including expo-ads-admob with all npm packages installed. Try it out:

var expoAdsAdmob = require("expo-ads-admob")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

expo-ads-admob v4.0.0

Provides support for the Google AdMob SDK (https://www.google.com/admob/) for mobile advertising. This module is largely based of the react-native-admob (https://github.com/sbugert/react-native-admob) module, as the documentation and questions surrounding that module may prove helpful. A simple example implementing AdMob SDK can be found at https://github.com/deadcoder0904/expo-google-admob

expo-ads-admob

Provides support for the Google AdMob SDK (https://www.google.com/admob/) for mobile advertising. This module is largely based of the react-native-admob (https://github.com/sbugert/react-native-admob) module, as the documentation and questions surrounding that module may prove helpful. A simple example implementing AdMob SDK can be found at https://github.com/deadcoder0904/expo-google-admob.

API documentation

Installation

This package is pre-installed in managed Expo projects. You may skip the rest of the installation guide if this applies to you.

For bare React Native projects, you must ensure that you have installed and configured the @unimodules/core package before continuing.

Add the package to your npm dependencies

npm install expo-ads-admob

Configure for iOS

Add the dependency to your Podfile and then run pod install.

pod 'EXAdsAdMob', path: '../node_modules/expo-ads-admob/ios'

Configure for Android

  1. Append the following lines to android/settings.gradle:
include ':expo-ads-admob'
project(':expo-ads-admob').projectDir = new File(rootProject.projectDir, '../node_modules/expo-ads-admob/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:
api project(':expo-ads-admob')
  1. In MainApplication.java, import the package and add it to the ReactModuleRegistryProvider list:
import expo.modules.ads.admob.AdMobPackage;
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(Arrays.<Package>asList(
  // Your other packages will be here
  new AdMobPackage()
), Arrays.<SingletonModule>asList());

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free