From ef7b7bd74ff5a5a9f1662eaa570e56cd449d9e3b Mon Sep 17 00:00:00 2001 From: delvedor Date: Tue, 24 Apr 2018 16:46:27 +0200 Subject: [PATCH] Updated Q&A --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0dcc6c7..520e818 100644 --- a/README.md +++ b/README.md @@ -466,7 +466,7 @@ Yes there are `react-native-push-notification` and `react-native-system-notifica - The PushNotificationIOS by react native team is still missing features that recurring, so we are adding it here #### My Android build is failing -Try update your SDK and google play service. +Try update your SDK and google play service. If you are having multiple plugins requiring different version of play-service sdk, skip conflicting group. The example project shows for how to colive with react-native-maps ``` compile(project(':react-native-maps')) { @@ -554,12 +554,18 @@ Issues and pull requests are welcome. Let's make this thing better! #### Credits Local notification implementation is inspired by react-native-push-notification by zo0r +#### I get the notifications in the logs, but the native prompt does not show up +Did you remember to ask the user permissions? ;) +```js +await FCM.requestPermissions({ badge: false, sound: true, alert: true }) +``` + ## Sending remote notification How to send a push notification from your server? You should `POST` to this endpoint: https://fcm.googleapis.com/fcm/send - + You need to set the headers of `Content-Type` to `application/json` and `Authorization` to `key=******` where you replace `******` with the "Legacy server key" from here the Firebase dashbaord. Get this information by first going to: 1. https://console.firebase.google.com/ @@ -614,4 +620,3 @@ fetch('https://fcm.googleapis.com/fcm/send', { }) }) ``` - -- 2.26.2