https://github.com/omansak/pushtowns
Send push notifications to WNS for Windows 8/10 applications UWP using .NET CORE
https://github.com/omansak/pushtowns
push-notifications uwp uwp-notifications wns
Last synced: 3 months ago
JSON representation
Send push notifications to WNS for Windows 8/10 applications UWP using .NET CORE
- Host: GitHub
- URL: https://github.com/omansak/pushtowns
- Owner: omansak
- Created: 2019-02-19T09:50:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T14:31:47.000Z (over 6 years ago)
- Last Synced: 2025-01-21T11:33:41.030Z (5 months ago)
- Topics: push-notifications, uwp, uwp-notifications, wns
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PushToWNS
Send push notifications to WNS for Windows 8/10 applications UWP using .NET CORE [Windows Notification Services] (https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/windows-push-notification-services--wns--overview).
# WNS (Windows Notification Service)
Send push notifications from a .NET Core application to a Windows 8/10 (UWP) device using Windows Notification Services.
# Pre-Requirements
## Secret & SId
Get SId and Secret from LiveServices (Dashboard -> Your App -> App Managament -> WNS/MPNS -> Live Services site)
```https://partner.microsoft.com/en-us/dashboard/products/<-YourProductId->/liveservices```
## Channel URI
Run in your client UWP application and get your channel URI
```c#
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
```
# Usage
```c#
PushToWNS.Configuration configuration = new Configuration();
configuration.ChannelUri = "https://db5p.notify.windows.com/?token=AwYAAADKCTA6i4....";
configuration.SId ="ms-app://s-1-15-2-1407194542-....";
configuration.Secret = "fgOErrASmDC7X/jwQhbg9hjVKS9....";
configuration.XML= @" ""> 🔥 Hello World ";
new PushToWNS.PushNotification().Push(configuration);
```