-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Labels
Description
Step 2: Describe your environment
- Operating System version: Server (Mac/Linux)
- Firebase SDK version: 6.10.0
- Library version: N/A
- Firebase Product: cloud messaging (auth, database, storage, etc)
[REQUIRED] Step 3: Describe the problem
Unable to set the android badge count via the Builder methods for AndroidNotification.
The json spec suggests this is the location to set such data, however, this is not surfaced to the builder yet.
Steps to reproduce:
I am trying to issue a Push Notification through FirebaseAdmin from my server and I can set the badge count on APNS using
builder.setApnsConfig(
ApnsConfig.builder().setAps(
Aps.builder().setBadge(badgeCount).build()).build());
Relevant Code:
However, there is no equivalent method on the AndroidNotification class to set the notification_count (even though it is specified in the json spec)
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidnotification
Ideally... ?
builder.setAndroidConfig(
AndroidConfig.builder().setNotification(
AndroidNotification.builder().setNotificationCount(badgeCount).build())
.build());
Maybe there's another way to do this, but I prefer to use the Admin SDK. Apologies if I am barking up the wrong tree.