-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
35 lines (33 loc) · 1.06 KB
/
App.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
import React from "react";
import { Provider } from "react-redux";
import { Alert, AppState } from "react-native";
import PushNotification from "react-native-push-notification";
import Scenes from "./src/Scenes";
import { store } from "./src/store";
import FlashMessage from "react-native-flash-message";
class App extends React.Component {
constructor(props) {
super();
PushNotification.configure({
onNotification: function(notification) {
if (notification.hasOwnProperty("notification")) {
//const notif = JSON.parse(notification.report_data);
//Alert.alert('Admin sent feedback ' + notif.feedback + ' for substep ' + notif.substep + ' in step ' + notif.step + 'in ' + notif.site);
//Alert.alert('ram');
console.log("NOtification", notification);
}
}
});
}
render() {
return (
<Provider store={store}>
<React.Fragment>
<Scenes />
<FlashMessage position="top" duration={1500} />
</React.Fragment>
</Provider>
);
}
}
export default App;