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
45c310a6
Commit
45c310a6
authored
May 07, 2018
by
Libin Lu
Committed by
GitHub
May 07, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #932 from evollu/remove-decode
remove decode for sound and image
parents
85e0a4ba
be82034d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
65 deletions
+61
-65
android/src/main/java/com/evollu/react/fcm/SendNotificationTask.java
.../main/java/com/evollu/react/fcm/SendNotificationTask.java
+61
-65
No files found.
android/src/main/java/com/evollu/react/fcm/SendNotificationTask.java
View file @
45c310a6
...
@@ -128,7 +128,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
...
@@ -128,7 +128,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
//large icon
//large icon
String
largeIcon
=
bundle
.
getString
(
"large_icon"
);
String
largeIcon
=
bundle
.
getString
(
"large_icon"
);
if
(
largeIcon
!=
null
&&
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
android
.
os
.
Build
.
VERSION_CODES
.
LOLLIPOP
){
if
(
largeIcon
!=
null
&&
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
android
.
os
.
Build
.
VERSION_CODES
.
LOLLIPOP
){
largeIcon
=
URLDecoder
.
decode
(
largeIcon
,
"UTF-8"
);
if
(
largeIcon
.
startsWith
(
"http://"
)
||
largeIcon
.
startsWith
(
"https://"
))
{
if
(
largeIcon
.
startsWith
(
"http://"
)
||
largeIcon
.
startsWith
(
"https://"
))
{
Bitmap
bitmap
=
getBitmapFromURL
(
largeIcon
);
Bitmap
bitmap
=
getBitmapFromURL
(
largeIcon
);
notification
.
setLargeIcon
(
bitmap
);
notification
.
setLargeIcon
(
bitmap
);
...
@@ -153,7 +152,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
...
@@ -153,7 +152,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
String
picture
=
bundle
.
getString
(
"picture"
);
String
picture
=
bundle
.
getString
(
"picture"
);
if
(
picture
!=
null
){
if
(
picture
!=
null
){
picture
=
URLDecoder
.
decode
(
picture
,
"UTF-8"
);
NotificationCompat
.
BigPictureStyle
bigPicture
=
new
NotificationCompat
.
BigPictureStyle
();
NotificationCompat
.
BigPictureStyle
bigPicture
=
new
NotificationCompat
.
BigPictureStyle
();
if
(
picture
.
startsWith
(
"http://"
)
||
picture
.
startsWith
(
"https://"
))
{
if
(
picture
.
startsWith
(
"http://"
)
||
picture
.
startsWith
(
"https://"
))
{
...
@@ -175,7 +173,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
...
@@ -175,7 +173,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
//sound
//sound
String
soundName
=
bundle
.
getString
(
"sound"
);
String
soundName
=
bundle
.
getString
(
"sound"
);
if
(
soundName
!=
null
)
{
if
(
soundName
!=
null
)
{
soundName
=
URLDecoder
.
decode
(
soundName
,
"UTF-8"
);
if
(
soundName
.
equalsIgnoreCase
(
"default"
))
{
if
(
soundName
.
equalsIgnoreCase
(
"default"
))
{
notification
.
setSound
(
RingtoneManager
.
getDefaultUri
(
RingtoneManager
.
TYPE_NOTIFICATION
));
notification
.
setSound
(
RingtoneManager
.
getDefaultUri
(
RingtoneManager
.
TYPE_NOTIFICATION
));
}
else
{
}
else
{
...
@@ -194,7 +191,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
...
@@ -194,7 +191,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
String
color
=
bundle
.
getString
(
"color"
);
String
color
=
bundle
.
getString
(
"color"
);
if
(
color
!=
null
)
{
if
(
color
!=
null
)
{
color
=
URLDecoder
.
decode
(
color
,
"UTF-8"
);
notification
.
setColor
(
Color
.
parseColor
(
color
));
notification
.
setColor
(
Color
.
parseColor
(
color
));
}
}
}
}
...
...
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