어떻게 설정 TTL에 (라이브에 시간) 웹 사용자에게 FCM 알림을 보내는 동안?

ACSH :

나는 중포 기지 클라우드 메시징을 통해 다수의 사용자 (WEB, WAP)에 통지를 보내도록 노력하고 있어요. 하지만 알림을 살 수있는 시간을 설정할 수 없습니다입니다.

Map<String, String> map = new HashMap<>();
    map.put("status", article.getStatus());
    map.put("headLine", article.getHeadLine());
    map.put("caption", article.getCaption());
    map.put("thumb", article.getThumb());
    map.put("tag", article.getTag());
    map.put("webUrl", article.getWebUrl());
    map.put("category", article.getCategory());

    WebpushConfig webpushConfig = WebpushConfig.builder().putAllData(map).putHeader("TTL", ttl + "").build();
    Message message = Message.builder()
            .setWebpushConfig(webpushConfig)
            .putAllData(map)
            .setTopic(id)
            .build();
    String response = FirebaseMessaging.getInstance().send(message);
ACSH :

나는 다음 행을 추가하여 동일하게 구성 할 수 있었다 : -

Map<String, String> headers = new HashMap<>();
headers.put("TTL", "3600");
headers.put("Urgency", "high");
WebpushConfig webpushConfig = WebpushConfig.builder().putAllHeaders(headers).build(); 

추천

출처http://43.154.161.224:23101/article/api/json?id=214847&siteId=1