aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-02-06 11:35:52 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-02-06 11:36:00 -0800
commitef45ad3dc840cef5ded156095ea8b2a70faf15d6 (patch)
treeaa65d41a7e3512718559cacd68f45e67cd3715d0 /src
parentd1b4f3bbcaec1cc36b7f1d169dda1db7f9a3c103 (diff)
downloadtraccar-server-ef45ad3dc840cef5ded156095ea8b2a70faf15d6.tar.gz
traccar-server-ef45ad3dc840cef5ded156095ea8b2a70faf15d6.tar.bz2
traccar-server-ef45ad3dc840cef5ded156095ea8b2a70faf15d6.zip
Enable push notification sound
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorFirebase.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
index 89cdbcb14..78d5da1e2 100644
--- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java
+++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java
@@ -39,6 +39,8 @@ public class NotificatorFirebase extends Notificator {
public static class Notification {
@JsonProperty("body")
private String body;
+ @JsonProperty("sound")
+ private String sound;
}
public static class Message {
@@ -66,6 +68,7 @@ public class NotificatorFirebase extends Notificator {
Notification notification = new Notification();
notification.body = NotificationFormatter.formatShortMessage(userId, event, position).trim();
+ notification.sound = "default";
Message message = new Message();
message.tokens = user.getString("notificationTokens").split("[, ]");