-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
41 lines (38 loc) · 1.14 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {
NativeModules,
NativeEventEmitter,
requireNativeComponent,
Platform,
} from "react-native";
const { Admost, AdmostInterstitial, AdmostRewarded } = NativeModules;
const AIEvents = {
DID_RECEIVE: "didReceiveInterstitial",
DID_FAIL_TO_RECEIVE: "didFailToReceiveInterstitial",
DID_SHOW: "didShowInterstitial",
DID_FAIL_TO_SHOW: "didFailToShowInterstitial",
DID_CLICK: "didClickInterstitial",
DID_DISMISS: "didDismissInterstitial",
};
const AREvents = {
DID_RECEIVE: "didReceiveRewardedVideo",
DID_FAIL_TO_RECEIVE: "didFailToReceiveRewardedVideo",
DID_SHOW: "didShowRewardedVideo",
DID_FAIL_TO_SHOW: "didFailToShowRewardedVideo",
DID_CLICK: "didClickRewardedVideo",
DID_DISMISS: "didDismissRewardedVideo",
DID_COMPLETE: "didCompleteRewardedVideo",
};
const AIEventEmitter = new NativeEventEmitter(AdmostInterstitial);
const AREventEmitter = new NativeEventEmitter(AdmostRewarded);
const AdmostBanner =
Platform.OS === "ios" ? requireNativeComponent("AdmostBanner") : null;
export {
AdmostInterstitial,
AdmostRewarded,
AIEvents,
AIEventEmitter,
AREvents,
AREventEmitter,
AdmostBanner,
};
export default Admost;