Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-fcm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-fcm
Commits
669c0c17
Commit
669c0c17
authored
Jun 07, 2016
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
3ec485c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
README.md
README.md
+32
-2
No files found.
README.md
View file @
669c0c17
## Installation
-
Run
`npm install react-native-fcm --save`
-
Run rnpm link
-
Run
`rnpm link`
Or you can combine 2 commands
-
Run
`rnpm install react-native-fcm --save`
## Android Configuration
...
...
@@ -143,7 +145,35 @@ this.fcmTokenLsnr.remove();
-
`FCM.initialData`
(contains
`data`
payload if you send together with notification)
-
When app is running in background
-
App will receive notificaton from
`FCMNotificationReceived`
event when user click on notification
-
App will receive notificaton from
`FCMNotificationReceived`
event when user click on notification.
e.g. fcm payload looks like
```
{
"to":"some_device_token",
"content_available": true,
"notification": {
"title": "hello",
"body": "yo",
"click_action": "fcm.ACTION.HELLO"
},
"data": {
"extra":"juice"
}
}
```
and event callback will receive as
```
///Android
{
fcm: {"action": "fcm.ACTION.HELLO"},
extra: "juice"
}
///IOS
{
apns: {action_category: "fcm.ACTION.HELLO"},
extra: "juice"
}
```
-
When app is running in foreground
-
IOS will receive notification and android
**won't**
(better not to do anything in foreground for hybrid and send a seprate data message.)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment