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
9e32abba
Commit
9e32abba
authored
Apr 16, 2018
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update data
parent
fbe27081
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
Examples/firebase-migration/app/App.js
Examples/firebase-migration/app/App.js
+2
-4
Examples/firebase-migration/app/Listeners.js
Examples/firebase-migration/app/Listeners.js
+2
-2
No files found.
Examples/firebase-migration/app/App.js
View file @
9e32abba
...
@@ -98,8 +98,7 @@ class MainPage extends Component {
...
@@ -98,8 +98,7 @@ class MainPage extends Component {
.
setBody
(
"
Force touch to reply
"
)
.
setBody
(
"
Force touch to reply
"
)
.
setSound
(
"
bell.mp3
"
)
.
setSound
(
"
bell.mp3
"
)
.
setData
({
.
setData
({
key1
:
'
value1
'
,
now
:
new
Date
().
toISOString
()
key2
:
'
value2
'
});
});
notification
.
ios
.
badge
=
10
notification
.
ios
.
badge
=
10
notification
.
android
.
setAutoCancel
(
true
);
notification
.
android
.
setAutoCancel
(
true
);
...
@@ -125,8 +124,7 @@ class MainPage extends Component {
...
@@ -125,8 +124,7 @@ class MainPage extends Component {
.
setBody
(
"
Force touch to reply
"
)
.
setBody
(
"
Force touch to reply
"
)
.
setSound
(
"
bell.mp3
"
)
.
setSound
(
"
bell.mp3
"
)
.
setData
({
.
setData
({
key1
:
'
value1
'
,
now
:
new
Date
().
toISOString
()
key2
:
'
value2
'
});
});
notification
.
android
.
setChannelId
(
"
test-channel
"
)
notification
.
android
.
setChannelId
(
"
test-channel
"
)
notification
.
android
.
setPriority
(
firebase
.
notifications
.
Android
.
Priority
.
High
)
notification
.
android
.
setPriority
(
firebase
.
notifications
.
Android
.
Priority
.
High
)
...
...
Examples/firebase-migration/app/Listeners.js
View file @
9e32abba
...
@@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){
...
@@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){
}
}
}
}
export
function
registerKilledListener
(
message
:
RemoteMessage
){
export
async
function
registerKilledListener
(
message
:
RemoteMessage
){
AsyncStorage
.
setItem
(
'
lastNotification
'
,
JSON
.
stringify
(
message
.
data
));
await
AsyncStorage
.
setItem
(
'
lastNotification
'
,
JSON
.
stringify
(
message
.
data
));
displayNotificationFromCustomData
();
displayNotificationFromCustomData
();
}
}
...
...
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