Azure / Azure/azure-notificationhubs-android
InstallationTemplate tags are not added in the Notification Hub templates
- Dominant language
- Java
- Stars
- 33
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
Bug - When I add the installation template using the below code with the tags. the tags are not actually added in the Azure notification hub templates.
code to create a template with tags:
```
InstallationTemplate testTemplate = new InstallationTemplate();
testTemplate.setBody("{\"data\":{\"message\":\"Notification Hub test notification: $myTextProp\"}}");
testTemplate.addTag("User_"+ userId);
testTemplate.addTag("testTemplate");
NotificationHub.setTemplate("testTemplate", testTemplate);
```
When I check the templates using my API to fetch the registered templates in ANH. It shows below properties:
```
{
"ETag": "19",
"ExpirationTime": "9999-12-31T23:59:59.9999999Z",
"RegistrationId": "1069460114778965412-4990591539251958152-8",
"GcmRegistrationId": "f25lTX9bJYg:APA91bHSsOeqmRcEwItm9Iq8npqxVBCNCKvNG0ypOIxh5eWtOocA8gglNsZX6aSxQ9F5MU-NyuD1Gr6quL5WV4FpPYhx8coVaXOLeZ79tfi15nl5vCuNC9y5YN78MfCt9gapp-rtvhks",
"BodyTemplate": {
"Value": "{\"data\":{\"message\":\"Notification Hub test notification: $myTextProp\"}}"
},
"TemplateName": "testTemplate"
},
```
It should add the tags in the template as well: like as
"Tags": "testTemplate,User_fd6c21f4-dcf6-4b1b-9f08-7b787b6caaac",
Info:
Android 10
targetSdkVersion 30
SDK - 'com.microsoft.azure:notification-hubs-android-sdk-fcm:1.1.6'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the InstallationTemplate.addTag and NotificationHub.setTemplate entry points, then reproduce the Android SDK 1.1.6 behavior using the code and API response in the issue. Verify the registered template output and determine whether the tags are retained; done means the fetched template includes the added tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100