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
fa17149d
Commit
fa17149d
authored
Jul 02, 2018
by
Libin Lu
Committed by
GitHub
Jul 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #985 from noambonnie/group-alert-behavior
Group alert behavior
parents
1525b511
b587872f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
android/src/main/java/com/evollu/react/fcm/SendNotificationTask.java
.../main/java/com/evollu/react/fcm/SendNotificationTask.java
+17
-0
index.d.ts
index.d.ts
+2
-0
No files found.
android/src/main/java/com/evollu/react/fcm/SendNotificationTask.java
View file @
fa17149d
...
...
@@ -92,7 +92,24 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
){
String
group
=
bundle
.
getString
(
"group"
);
if
(
group
!=
null
)
group
=
URLDecoder
.
decode
(
group
,
"UTF-8"
);
notification
.
setGroup
(
group
);
String
groupAlertBehavior
=
bundle
.
getString
(
"groupAlertBehavior"
,
"not-set"
);
switch
(
groupAlertBehavior
)
{
case
"children"
:
notification
.
setGroupAlertBehavior
(
NotificationCompat
.
GROUP_ALERT_CHILDREN
);
break
;
case
"summary"
:
notification
.
setGroupAlertBehavior
(
NotificationCompat
.
GROUP_ALERT_SUMMARY
);
break
;
case
"all"
:
notification
.
setGroupAlertBehavior
(
NotificationCompat
.
GROUP_ALERT_ALL
);
break
;
default
:
break
;
// Leave default behavior to Android defaults.
}
if
(
bundle
.
containsKey
(
"groupSummary"
)
&&
bundle
.
getBoolean
(
"groupSummary"
))
{
notification
.
setGroupSummary
(
true
);
}
...
...
index.d.ts
View file @
fa17149d
...
...
@@ -89,6 +89,8 @@ declare module "react-native-fcm" {
ticker
?:
string
;
auto_cancel
?:
boolean
;
group
?:
string
;
groupSummary
?:
boolean
;
groupAlertBehavior
?:
string
;
picture
?:
string
;
ongoing
?:
boolean
;
lights
?:
boolean
;
...
...
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