Azure / azure-notificationhubs-samples

Microsoft Azure Notification Hubs Samples
Apache License 2.0
162 stars 240 forks source link

cordova azure push notification custom backend #46

Closed aguerot closed 5 years ago

aguerot commented 7 years ago

I am trying to work around the following:

Azure push notification (WNS and GCM) Custom backend (more on that bellow) Win10 client (working fine so far) cordova client for Android/iOS (current pain point) As opposed to most tutorials found on Azure documentation I want to use my own node backend to trigger notifications and not an Azure Mobile Service.

I have configured Azure push notification and I can send and receive notification on a W10 client using only Notification hub connection strings such as: Endpoint=sb://<myns>.servicebus.windows.net/;SharedAccessKeyName=<mykeyname>;SharedAccessKey=<mykey> I can register my notification template and receive notifications on my W10 app.

I want now to do the same on a Cordova app. All the tutorials I have found so far rely on first connecting to an Azure Mobile Service and access the push service through its client.

What I am trying to do is register a custom notification template using an EndPoint=sb:// connection string so I can receive notifications on my Android device.

On my custom node backend, I use the Azure package and its createNotificationHubService method to send custom notifications.

Any pointers on how to register an Azure Notification Hub client without an Azure Mobile service backend would be greatly appreciated.

A.

jwargo commented 5 years ago

@aguerot I'm sorry, I don't have any suggestions. As this issue is almost two years old, I'm assuming you've resolved it. If you have code to share, let me know and I'll make it part of the docs or part of the samples. I'm planning a refresh of the Samples soon.