As per here and here, FCM supports sending mutable_content
variable as a boolean when using FCM REST APIs. But I couldn't find an equivalent method in the Firebase Admin Java API.
final ApsAlert alert = ApsAlert.builder()
.setTitle("Test notification")
.setBody("Hello World")
.build();
final Aps aps = Aps.builder()
.setAlert(alert)
.setBadge(messageCount)
.setContentAvailable(messageCount > 10000)
.setCategory("tesy")
.build();
final ApnsConfig config = ApnsConfig.builder()
.putHeader("apns-id", getMessageId())
.setAps(aps)
.putCustomData("type", "test")
.putCustomData("mutable_content", true)
.build();
remoteMessage.setApnsConfig(config);
Tried setting it as a custom data value in ApnsConfig
, however, it does not work.
PS: This method runs in a Spring boot server to send the notification to users.