I have the following code which uses firebase-admin to send messages using Firebase cloud messaging
Message message = null;
message = Message.builder().putData("From", fromTel).putData("To", toTel).putData("Text", text)
.setToken(registrationToken).build();
String response = null;
try {
response = FirebaseMessaging.getInstance().sendAsync(message).get();
responseEntity = new ResponseEntity<String>(HttpStatus.ACCEPTED);
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
System.out.println("Successfully sent message: " + response);
The above code works fine. But I need to send "high-priority" messages so that the device can receive them while in doze mode.
How can I make the messages "high-priority"?