-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·59 lines (51 loc) · 1.41 KB
/
index.js
File metadata and controls
executable file
·59 lines (51 loc) · 1.41 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* @format
*/
import 'intl-pluralrules';
import {AppRegistry} from 'react-native';
import App from './src/App';
import {name as appName} from './app.json';
import {LogLevel, OneSignal} from 'react-native-onesignal';
import {
Appodeal,
AppodealAdType,
AppodealSdkEvent,
AppodealLogLevel,
} from 'react-native-appodeal';
import {ONESIGNAL_APP_ID, APPODEAL_APP_ID} from '@env';
import notifee, {AndroidImportance} from '@notifee/react-native';
// Notifee init Code
notifee.getChannel('posts_interaction').then(channel => {
if (channel === null) {
notifee.createChannel({
id: 'posts_interactions',
name: 'Post Interactions',
lights: true,
vibration: true,
importance: AndroidImportance.HIGH,
});
}
});
notifee.getChannel('default').then(channel => {
if (channel === null) {
notifee.createChannel({
id: 'default',
name: 'Default',
importance: AndroidImportance.DEFAULT,
});
}
});
// OneSignal Init Code
OneSignal.Debug.setLogLevel(__DEV__ ? LogLevel.Verbose : LogLevel.None);
OneSignal.initialize(ONESIGNAL_APP_ID);
// Appodeal init Code
const adTypes =
AppodealAdType.INTERSTITIAL |
AppodealAdType.REWARDED_VIDEO |
AppodealAdType.BANNER;
Appodeal.setTesting(__DEV__);
Appodeal.setLogLevel(
__DEV__ ? AppodealLogLevel.VERBOSE : AppodealLogLevel.NONE,
);
Appodeal.initialize(APPODEAL_APP_ID, adTypes);
AppRegistry.registerComponent(appName, () => App);