diff --git a/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java b/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java index f47c8d33f..69bbd61ce 100644 --- a/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java +++ b/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java @@ -4,6 +4,7 @@ import com.ddang.ddang.device.domain.DeviceToken; import com.ddang.ddang.device.infrastructure.persistence.JpaDeviceTokenRepository; import com.ddang.ddang.notification.application.dto.CreateNotificationDto; +import com.google.firebase.messaging.AndroidConfig; import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.FirebaseMessagingException; import com.google.firebase.messaging.Message; @@ -44,6 +45,9 @@ private String makeAndSendMessage( final CreateNotificationDto createNotificationDto, final DeviceToken deviceToken ) { + final AndroidConfig androidConfig = AndroidConfig.builder() + .setPriority(AndroidConfig.Priority.HIGH) + .build(); final Message message = Message.builder() .setToken(deviceToken.getDeviceToken()) .putData(NOTIFICATION_TYPE.getKeyName(), createNotificationDto.notificationType().getValue()) @@ -51,6 +55,7 @@ private String makeAndSendMessage( .putData(TITLE.getKeyName(), createNotificationDto.title()) .putData(BODY.getKeyName(), createNotificationDto.body()) .putData(REDIRECT_URL.getKeyName(), createNotificationDto.redirectUrl()) + .setAndroidConfig(androidConfig) .build(); try {