Open niren777 opened 5 years ago
Hi niren777, You can use your backend server to register a device to some tag by using the azure push notification hubs apis. Here is the implementation of java: https://github.com/Azure/azure-notificationhubs-java-backend
@derek82511 In the backend, we use python. We have integrated the backend with Azure Notification Hub using the tutorial https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-python-push-notification-tutorial. In the backend we use the tag to send a notification but the mobile is not receiving since the mobile is not registered to the particular tag.
The java based notification that you mentioned is different from the python backend. In our setup, the frontend is independent of backend. The backend only to serve the Restful APIs. So I'm not sure about registering the frontend device from the backend.
@niren777 You can implement your python code to call the azure push notification hubs rest apis.
The link of register rest api: https://docs.microsoft.com/en-us/rest/api/notificationhubs/create-registration
The azure push notification hubs backend implementation of java almost use this rest api to register device or send message to azure.
@derek82511 Should I still use this plugin(cordova-azure-notification-hubs
) in my app If I register the device from the backend app?
@derek82511 Should I still use this plugin(
cordova-azure-notification-hubs
) in my app If I register the device from the backend app?
@niren777 where you able to register the device in the backend?
I'm able to configure the Azure Notification Hub with Cordova app. The code, I used is given below
with the above code, the mobile receives the notification when I send notification from Azure portal using
Test Send
. When I add Tag Expression inTest Send
, the mobile is not receiving the notification.I'm not sure how to subscribe to a particular tag
The function
pushNotification.subscribe()
gives errorsubscribe is not a function
Is there a way to subscribe to the tag?