Azure / Azure/azure-notificationhubs-android
FCM/GCM: template parameters are not correctly replaced
- Dominant language
- Java
- Stars
- 33
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the Notification Hub client lib 1.0.9
I am registering a template like this:
```
{
"notification" : {
"title" : "$(sender)",
"body" : "$(message)"
}
}
```
When I send my templates message I populate the params dictionary with the keys `sender` and `message` and they will be replaced as expected and result in the following output:
```
{com.google.firebase.messaging.RemoteMessage$Notification@305d335}
Body: "hallo2"
Title: "Bulk message from backend"
```
Notice how body and title are correctly set.
Then I change my template to include additional text like below:
```
{
"notification" : {
"title" : "$(sender)",
"body" : "Some other text. $(message)"
}
}
```
and the result is:
```
{com.google.firebase.messaging.RemoteMessage$Notification@4c9d296}
Body: "Some other text. $(message)"
Title: "Bulk message from backend"
```
The `message` placeholder is not being replaced anymore. This is for FCM/GCM only and work fine for iOS templates.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.