Below is my code in spring boot.
private void sendNotification(FCMMessageRequestDTO fcmMessageRequestDTO) {
    MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
    headers.set("Authorization", fcmAuthorizationKey);
    headers.add("Content-Type", "application/json");
    RestTemplate restTemplate = new RestTemplate();
    restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
    HttpEntity<FCMMessageRequestDTO> request = new HttpEntity<>(fcmMessageRequestDTO, headers);
    restTemplate.postForObject(fcmMessageUrl, request, Object.class);
}
Here how can I check the status of delivery of notification to device.
Can someone help me out in this.
 
    