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
0e4aca82
Commit
0e4aca82
authored
Mar 06, 2018
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update example
parent
d78529a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Examples/simple-fcm-client/app/App.js
Examples/simple-fcm-client/app/App.js
+1
-1
Examples/simple-fcm-client/app/Listeners.js
Examples/simple-fcm-client/app/Listeners.js
+3
-0
No files found.
Examples/simple-fcm-client/app/App.js
View file @
0e4aca82
...
@@ -66,7 +66,7 @@ class MainPage extends Component {
...
@@ -66,7 +66,7 @@ class MainPage extends Component {
showLocalNotification
()
{
showLocalNotification
()
{
FCM
.
presentLocalNotification
({
FCM
.
presentLocalNotification
({
id
:
"
UNIQ_ID_STRING
"
,
// (optional for instant notification)
id
:
new
Date
().
valueOf
().
toString
(),
// (optional for instant notification)
title
:
"
Test Notification with action
"
,
// as FCM payload
title
:
"
Test Notification with action
"
,
// as FCM payload
body
:
"
Force touch to reply
"
,
// as FCM payload (required)
body
:
"
Force touch to reply
"
,
// as FCM payload (required)
sound
:
"
bell.mp3
"
,
// "default" or filename
sound
:
"
bell.mp3
"
,
// "default" or filename
...
...
Examples/simple-fcm-client/app/Listeners.js
View file @
0e4aca82
...
@@ -61,6 +61,9 @@ export function registerAppListener(navigation){
...
@@ -61,6 +61,9 @@ export function registerAppListener(navigation){
navigation
.
navigate
(
'
Detail
'
)
navigation
.
navigate
(
'
Detail
'
)
},
500
)
},
500
)
}
}
setTimeout
(()
=>
{
alert
(
`User tapped notification\n
${
JSON
.
stringify
(
notif
)}
`
)
},
500
)
}
}
if
(
Platform
.
OS
===
'
ios
'
){
if
(
Platform
.
OS
===
'
ios
'
){
...
...
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