aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-01 19:24:15 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-01 19:24:15 -0700
commit63a8bb747e92cc98d64bad59464922a9f6be5867 (patch)
treed1c9e68c514862c233d5c6301d92dc2f7de7b24d
parent0a853f2aa3556554acd0b43a5008c43c345fa300 (diff)
downloadtrackermap-server-63a8bb747e92cc98d64bad59464922a9f6be5867.tar.gz
trackermap-server-63a8bb747e92cc98d64bad59464922a9f6be5867.tar.bz2
trackermap-server-63a8bb747e92cc98d64bad59464922a9f6be5867.zip
Enable iOS sound
-rw-r--r--src/main/java/org/traccar/notificators/NotificatorFirebase.java7
1 files changed, 7 insertions, 0 deletions
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();