-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
31 lines (25 loc) · 897 Bytes
/
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
import React,{useEffect} from 'react';
import 'react-native-gesture-handler';
import AppNavigation from './src/navigation/AppNavigation';
import { Provider } from "react-redux";
import {requestUserPermission,notificationListner} from './src/components/NotificationServices'
import { LocalNotification } from "./src/components/LocalPushController";
import RemotePushController from "./src/components/RemotePushController";
import messaging from '@react-native-firebase/messaging';
import store from "./src/helper/store";
const App = () =>{
useEffect(()=>{
requestUserPermission();
notificationListner();
})
return (
<Provider store = {store}>
<AppNavigation/>
<RemotePushController/>
</Provider>
);
}
messaging().setBackgroundMessageHandler(async remoteMessage => {
console.log('Message handled in the background!', remoteMessage);
});
export default App;