Push Notifications using Notification Hub and .NET Web API as a backend

I am working on a project where I implemented a web API with an asp.net identifier for user authentication. The iPhone application will access this web API to perform several tasks, such as authorizing using the db identifier, subscribing to groups, etc.

I am going to publish this web API in windows azure and am going to use the Azure notification hub to send notifications. Now in my iPhone application, a user can subscribe to one or several groups to receive notifications about events of this group. ie The user can subscribe to the Cricket and Math groups to receive notifications about these groups. Thus, these groups really become tags for the notification center.

Now my question is: There are two ways to register a device in the notification center.

1) using the application itself

2) using the web API that I created.

I want to follow the second approach. I want user devices to register in the notification center through my web API.

How can i achieve this? For this purpose, I did not find a satisfactory piece of code. Can someone provide me a better explanation or code snippet on this?

thank

+4
source share

Source: https://habr.com/ru/post/1543510/


All Articles