aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorShravya Ramesh <37447613+shravyaramesh@users.noreply.github.com>2020-12-29 11:41:57 -0800
committerGitHub <noreply@github.com>2020-12-29 14:41:57 -0500
commit05cd91206a6ce3361097d9eb408a447eae3d120e (patch)
tree1b8c5ba82358c3f9b393ea42d03b6c9c7219ce7f /index.js
parentefaa41884b5aa4b4704380eb3615d3801958a775 (diff)
[TMA-288] notifications frontend infra (#154)
* Configured settings to enable remote notifications * Added FCM services * Added background message handler + api calls * minor fixes * minor changes requested from pr
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
index 4117260f..e1cf0015 100644
--- a/index.js
+++ b/index.js
@@ -6,5 +6,10 @@ import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './src';
import {name as appName} from './app.json';
+import messaging from '@react-native-firebase/messaging';
+
+messaging().setBackgroundMessageHandler(async (remoteMessage) => {
+ console.log('Message handled in background ', remoteMessage);
+});
AppRegistry.registerComponent(appName, () => App);