Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstallationTemplate tags are not added in the Notification Hub templates #226

Open
hanatharesh2712 opened this issue Sep 17, 2021 · 1 comment

Comments

@hanatharesh2712
Copy link

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'

@aziztitu
Copy link
Contributor

@hanatharesh2712 Can you try to use the GetInstallation API to check if you can see the tags in the response?

Get Installation API: https://learn.microsoft.com/en-us/rest/api/notificationhubs/read-installation

If you are still experiencing the issue, please provide your namespace and hub name, and we can try to debug the issue on our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants