13. 13
tile
Base tile element, contains one “visual” element Defines one (1) tile
template
visual Can contains multiple binding child elements, each of which defines a tile
binding Defines one (1) tile template
text Text used in the tile template.
image Image used in the tile template. Should match the size and shape image
requirements for the template.
14. XmlDocument tileDoc = new XmlDocument();
tileDoc.LoadXml("<my tile XML/>");
TileNotification myNewTile = new TileNotification(tileDoc);
TileUpdater myTileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
myTileUpdater.Update(myNewTile);
22. var scheduleToast = new ScheduledToastNotification(
xmlDoc,
DateTimeOffset.UtcNow + TimeSpan.FromDays(1.0) );
var toastNotify = ToastNotificationManager.CreateToastNotifier();
toastNotify.AddToSchedule(scheduleToast);
23. HTTP request for
XML payload
Windows Services
System process 30m –
24 hour frequency
var periodic = TileUpdateManager.CreateTileUpdaterForApplication();
Uri myTileFeed = new Uri("http://mysite.com/tileRSS.xml");
periodic.StartPeriodicUpdate(myTileFeed, PeriodicUpdateRecurrence.Hour);
30. 1. Request Channel URI
2. Register with your
Cloud Service
3. Authenticate & Push
Notification
My Developer
Service
Windows Push
Notification Service
31.
32.
33.
34.
35. Get Channel URL
void gotNotification(PushNotificationChannel sender,
PushNotificationReceivedEventArgs args)
{
Debug.WriteLine(args.NotificationType.ToString());
}
var channel = await
PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
SaveUriForNotificationService(channel.Uri);
channel.PushNotificationReceived +=channel_PushNotificationReceived;
36. Sample Project for Push Notifications
[URL for notification sample service project, visible at
http://pushtestserver.azurewebsites.net/wns/ ]
Use Azure Notification Hub
Cross device notifications
http://aka.ms/notifyhub