From ef45ad3dc840cef5ded156095ea8b2a70faf15d6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 6 Feb 2021 11:35:52 -0800 Subject: Enable push notification sound --- src/main/java/org/traccar/notificators/NotificatorFirebase.java | 3 +++ 1 file changed, 3 insertions(+) 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("[, ]"); -- cgit v1.2.3