How to use the expo-core.NativeModulesProxy.ExpoAdsAdMobRewardedVideoAdManager function in expo-core

To help you get started, we’ve selected a few expo-core 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 expo / expo / modules / expo-ads-admob / src / AdMobRewarded.js View on Github external
// @flow

'use strict';

import { NativeModulesProxy, EventEmitter } from 'expo-core';
import { Platform } from 'react-native';

const AdMobRewardedVideoAdManager: Object = NativeModulesProxy.ExpoAdsAdMobRewardedVideoAdManager;

const adMobRewardedEventEmitter = new EventEmitter(AdMobRewardedVideoAdManager);

const eventNames = [
  'rewardedVideoDidRewardUser',
  'rewardedVideoDidLoad',
  'rewardedVideoDidFailToLoad',
  'rewardedVideoDidOpen',
  'rewardedVideoDidStart',
  'rewardedVideoDidClose',
  'rewardedVideoWillLeaveApplication',
];

type EventNameType =
  | 'rewardedVideoDidRewardUser'
  | 'rewardedVideoDidLoad'