From 63a8bb747e92cc98d64bad59464922a9f6be5867 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 1 Oct 2022 19:24:15 -0700 Subject: Enable iOS sound --- src/main/java/org/traccar/notificators/NotificatorFirebase.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/notificators/NotificatorFirebase.java b/src/main/java/org/traccar/notificators/NotificatorFirebase.java index 3723a4226..5ce2cbc0b 100644 --- a/src/main/java/org/traccar/notificators/NotificatorFirebase.java +++ b/src/main/java/org/traccar/notificators/NotificatorFirebase.java @@ -21,6 +21,8 @@ import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; import com.google.firebase.messaging.AndroidConfig; import com.google.firebase.messaging.AndroidNotification; +import com.google.firebase.messaging.ApnsConfig; +import com.google.firebase.messaging.Aps; import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.FirebaseMessagingException; import com.google.firebase.messaging.MulticastMessage; @@ -79,6 +81,11 @@ public class NotificatorFirebase implements Notificator { .setSound("default") .build()) .build()) + .setApnsConfig(ApnsConfig.builder() + .setAps(Aps.builder() + .setSound("default") + .build()) + .build()) .addAllTokens(registrationTokens) .putData("eventId", String.valueOf(event.getId())) .build(); -- cgit v1.2.3