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
8b2328f4
Commit
8b2328f4
authored
Jun 11, 2017
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix example
parent
8f60cc28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
Examples/simple-fcm-client/app/App.js
Examples/simple-fcm-client/app/App.js
+1
-0
Examples/simple-fcm-client/app/PushController.js
Examples/simple-fcm-client/app/PushController.js
+6
-4
No files found.
Examples/simple-fcm-client/app/App.js
View file @
8b2328f4
...
@@ -30,6 +30,7 @@ export default class App extends Component {
...
@@ -30,6 +30,7 @@ export default class App extends Component {
showLocalNotification
()
{
showLocalNotification
()
{
FCM
.
presentLocalNotification
({
FCM
.
presentLocalNotification
({
vibrate
:
500
,
title
:
'
Hello
'
,
title
:
'
Hello
'
,
body
:
'
Test Notification
'
,
body
:
'
Test Notification
'
,
priority
:
"
high
"
,
priority
:
"
high
"
,
...
...
Examples/simple-fcm-client/app/PushController.js
View file @
8b2328f4
...
@@ -18,10 +18,12 @@ export default class PushController extends Component {
...
@@ -18,10 +18,12 @@ export default class PushController extends Component {
console
.
log
(
"
TOKEN (getFCMToken)
"
,
token
);
console
.
log
(
"
TOKEN (getFCMToken)
"
,
token
);
this
.
props
.
onChangeToken
(
token
);
this
.
props
.
onChangeToken
(
token
);
});
});
FCM
.
getAPNSToken
().
then
(
token
=>
{
if
(
Platform
.
OS
===
'
ios
'
){
console
.
log
(
"
APNS TOKEN (getFCMToken)
"
,
token
);
FCM
.
getAPNSToken
().
then
(
token
=>
{
});
console
.
log
(
"
APNS TOKEN (getFCMToken)
"
,
token
);
});
}
FCM
.
getInitialNotification
().
then
(
notif
=>
{
FCM
.
getInitialNotification
().
then
(
notif
=>
{
console
.
log
(
"
INITIAL NOTIFICATION
"
,
notif
)
console
.
log
(
"
INITIAL NOTIFICATION
"
,
notif
)
...
...
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