From 6f7687af5be8a670bfb19f1337eb5a01f3ef4fc9 Mon Sep 17 00:00:00 2001 From: Shoaib Riaz Date: Sat, 6 Aug 2022 01:35:18 +0200 Subject: [PATCH] Added fix for FirebaseApp initialization in case of local notifications on android --- Notifications.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Notifications.js b/Notifications.js index e1a2186..6171582 100644 --- a/Notifications.js +++ b/Notifications.js @@ -1,5 +1,6 @@ import PushNotification from 'react-native-push-notification'; import PushNotificationIOS from '@react-native-community/push-notification-ios'; +import {Platform} from 'react-native'; class Notifications { constructor() { PushNotification.configure({ @@ -12,7 +13,7 @@ class Notifications { notification.finish(PushNotificationIOS.FetchResult.NoData); }, popInitialNotification: true, - requestPermissions: true, + requestPermissions:Platform.OS === 'ios', // IOS ONLY (optional): default: all - Permissions to register. permissions: { alert: true,