How to use the react-native-firebase.admob function in react-native-firebase

To help you get started, we’ve selected a few react-native-firebase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RSG-Group / RSG-Chess-mobile / App.js View on Github external
import Settings from "./src/pages/Settings";
import About from "./src/pages/About";
import Privacy from "./src/pages/Privacy";
import NewGame from "./src/pages/NewGame";
import SplashScreen from "react-native-splash-screen";

type Props = {};
let game = Game.prototype.initializeGame();
const blankFEN = game.FEN;

// Set up Firebase
firebase.perf().setPerformanceCollectionEnabled(true);

// Set up AdMob
firebase.admob().initialize("ca-app-pub-3522556458609123~4498098193");
let interstitial = firebase
  .admob()
  .interstitial("ca-app-pub-3522556458609123/5974831399");
let AdRequest = firebase.admob.AdRequest;
// request.addKeyword('foo').addKeyword('bar');
interstitial.loadAd(new AdRequest().build());
interstitial.on("onAdClosed", () => {
  interstitial.loadAd(new AdRequest().build());
});

let language = NativeModules.I18nManager.localeIdentifier.split(`_`)[0];
firebase.crashlytics().setStringValue("initial_language", language);

const supportedLangs = Object.keys(strings.languages);
if (!includes(supportedLangs, language)) language = "en";

const supportedPalettes = Object.keys(colorPalettes);
github RSG-Group / RSG-Chess-mobile / App.js View on Github external
import Play from "./src/pages/Play";
import Settings from "./src/pages/Settings";
import About from "./src/pages/About";
import Privacy from "./src/pages/Privacy";
import NewGame from "./src/pages/NewGame";
import SplashScreen from "react-native-splash-screen";

type Props = {};
let game = Game.prototype.initializeGame();
const blankFEN = game.FEN;

// Set up Firebase
firebase.perf().setPerformanceCollectionEnabled(true);

// Set up AdMob
firebase.admob().initialize("ca-app-pub-3522556458609123~4498098193");
let interstitial = firebase
  .admob()
  .interstitial("ca-app-pub-3522556458609123/5974831399");
let AdRequest = firebase.admob.AdRequest;
// request.addKeyword('foo').addKeyword('bar');
interstitial.loadAd(new AdRequest().build());
interstitial.on("onAdClosed", () => {
  interstitial.loadAd(new AdRequest().build());
});

let language = NativeModules.I18nManager.localeIdentifier.split(`_`)[0];
firebase.crashlytics().setStringValue("initial_language", language);

const supportedLangs = Object.keys(strings.languages);
if (!includes(supportedLangs, language)) language = "en";