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
d09bdc66
Commit
d09bdc66
authored
Jun 03, 2017
by
Libin Lu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/evollu/react-native-fcm
into v7
parents
59d839f6
d1cd4014
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
...in/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
+22
-0
No files found.
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
View file @
d09bdc66
...
...
@@ -133,6 +133,28 @@ public class FIRLocalMessagingHelper {
notification
.
setStyle
(
new
NotificationCompat
.
BigTextStyle
().
bigText
(
bigText
));
}
//picture
String
picture
=
bundle
.
getString
(
"picture"
);
if
(
picture
!=
null
){
NotificationCompat
.
BigPictureStyle
bigPicture
=
new
NotificationCompat
.
BigPictureStyle
();
if
(
picture
.
startsWith
(
"http://"
)
||
picture
.
startsWith
(
"https://"
))
{
Bitmap
bitmap
=
getBitmapFromURL
(
picture
);
bigPicture
.
bigPicture
(
bitmap
);
}
else
{
int
pictureResId
=
res
.
getIdentifier
(
picture
,
"mipmap"
,
packageName
);
Bitmap
pictureResIdBitmap
=
BitmapFactory
.
decodeResource
(
res
,
pictureResId
);
if
(
pictureResId
!=
0
)
{
bigPicture
.
bigPicture
(
pictureResIdBitmap
);
}
}
bigPicture
.
setBigContentTitle
(
title
);
bigPicture
.
setSummaryText
(
bundle
.
getString
(
"body"
));
notification
.
setStyle
(
bigPicture
);
}
//sound
String
soundName
=
bundle
.
getString
(
"sound"
,
"default"
);
if
(!
soundName
.
equalsIgnoreCase
(
"default"
))
{
...
...
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