File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ notification.imageUrl = "http://example.com/assets/image.png";
5555notification. ttl = 604800 ;
5656// optional, prevent Chrome on desktop from automatically closing the notification after a few seconds
5757notification. requireInteraction = true ;
58+ // optional, enable this option only for time-sensitive alerts (e.g. incoming phone call)
59+ notification. urgent = false ;
5860// optional, a string that is passed as an argument to action button callbacks
5961notification. customData = " 123" ;
6062// optional, add some action buttons to the notification
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ public class Notification {
1818 public String imageUrl ;
1919 public Integer ttl ;
2020 public Boolean requireInteraction ;
21+ public Boolean urgent ;
2122 public String customData ;
2223 public String [] customMetrics ;
2324 public ActionButton [] actionButtons ;
@@ -74,6 +75,9 @@ private String reqBody(String[] uids, String[] tags) {
7475 if (this .requireInteraction != null ) {
7576 notificationData .put ("require_interaction" , this .requireInteraction );
7677 }
78+ if (this .urgent != null ) {
79+ notificationData .put ("urgent" , this .urgent );
80+ }
7781 if (this .customData != null ) {
7882 notificationData .put ("custom_data" , this .customData );
7983 }
You can’t perform that action at this time.
0 commit comments