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
f4a24b47
Commit
f4a24b47
authored
Jan 05, 2017
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sound for android
parent
4dbcb8ca
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
162 deletions
+7
-162
android/react-native-fcm.iml
android/react-native-fcm.iml
+0
-160
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
...in/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
+7
-2
No files found.
android/react-native-fcm.iml
deleted
100644 → 0
View file @
4dbcb8ca
This diff is collapsed.
Click to expand it.
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
View file @
f4a24b47
...
...
@@ -134,8 +134,13 @@ public class FIRLocalMessagingHelper {
}
//sound
if
(
bundle
.
getString
(
"sound"
)
!=
null
)
{
int
soundResourceId
=
res
.
getIdentifier
(
bundle
.
getString
(
"sound"
),
"raw"
,
packageName
);
String
soundName
=
bundle
.
getString
(
"sound"
,
"default"
);
if
(!
soundName
.
equalsIgnoreCase
(
"default"
))
{
int
soundResourceId
=
res
.
getIdentifier
(
soundName
,
"raw"
,
packageName
);
if
(
soundResourceId
==
0
){
soundName
=
soundName
.
substring
(
0
,
soundName
.
lastIndexOf
(
'.'
));
soundResourceId
=
res
.
getIdentifier
(
soundName
,
"raw"
,
packageName
);
}
notification
.
setSound
(
Uri
.
parse
(
"android.resource://"
+
packageName
+
"/"
+
soundResourceId
));
}
...
...
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