Closed nithinyell closed 3 years ago
Replaces this with steps to repro your issue, if applicable.
App using registerTemplate, is not receiving any push notifications.
registerTemplate
Describe what you expected would happen. Application is receiving push Notifications, if we use register() func, but for registerTemplate()
const template = '{\"data\":{\"message\":\"$(message)\"}}'; const templateName = 'Template Name'; async registerAndroidTemplate() { PushNotificationEmitter.addListener(EVENT_AZURE_NOTIFICATION_HUB_REGISTERED, this.onAzureNotificationHubRegistered); PushNotificationEmitter.addListener(EVENT_AZURE_NOTIFICATION_HUB_REGISTERED_ERROR, this.onAzureNotificationHubRegistrationError); let alias = await AsyncStorage.getItem("userAlias") tags.push(alias) console.log("***", tags) NotificationHub.registerTemplate({ connectionString, hubName, tags, senderID, template, templateName, channelImportance, channelShowBadge, channelEnableLights, channelEnableVibration }) .then((res) => console.warn(res)) .catch(reason => console.warn(reason)); }
Reference Screen
@phongcao Please take a look.
We are using register() Decided not to useregisterTemplate()as we do not see any push notifications for it.
register()
registerTemplate()
Register template function is not working to receive the push notifications.
Issues and Steps to Reproduce
Replaces this with steps to repro your issue, if applicable.
App using
registerTemplate
, is not receiving any push notifications.Expected Behavior
Describe what you expected would happen. Application is receiving push Notifications, if we use register() func, but for registerTemplate()
Link to Code
Reference Screen