C# Class PhotoSharingApp.AppService.Notifications.NotificationHandler

Sends Push notification to registered tag.
Inheritance: INotificationHandler
Exibir arquivo Open project: Microsoft/Appsample-Photosharing

Public Methods

Method Description
SendPushAsync ( PushNotificationPlatform platform, string userNotificationTag, string message, string thumbnailUrl = "", string photoId = "", int goldCount ) : Task

Sends a rich push notification message with a thumbnail image and arguments to launch the image. Also sends live tile and badge notification if the optional parameters are passed. Otherwise, only a simple text push message is sent.

Private Methods

Method Description
GenerateBadgeNotification ( uint goldCount ) : string

Generates badge notification of goldCount change for receiver.

GenerateTileNotification ( string thumbnailUrl ) : string

Generates tile notification of gold notification using the receiver's picture

Method Details

SendPushAsync() public method

Sends a rich push notification message with a thumbnail image and arguments to launch the image. Also sends live tile and badge notification if the optional parameters are passed. Otherwise, only a simple text push message is sent.
public SendPushAsync ( PushNotificationPlatform platform, string userNotificationTag, string message, string thumbnailUrl = "", string photoId = "", int goldCount ) : Task
platform PushNotificationPlatform The platform specific notification service to use.
userNotificationTag string The user notification tag to send notification to.
message string The message to display on the notification toast.
thumbnailUrl string Optional - The thumbnail Url of the photo to display in notification.
photoId string Optional - The photoId of the photo to send as activation argument.
goldCount int Optional - The goldCount of the photo's owner.
return Task