tile template catalog badge catalog toast template catalog
tile template catalog badge catalog toast template catalog toast audio options catalog
XML badge update schema <? xml version = "1. 0" encoding = "utf-8" ? > <badge value = "1 -99" | "none" | "activity" | "alert" | "available" | "away" |. . . version? = "integer" />
XML tile update schema <? xml version="1. 0" encoding="utf-8" ? > <tile> <visual version? = "integer" lang? = "string" base. Uri? = "any. URI" branding? = "string" add. Image. Query? = "boolean" > <!-- One or more binding elements: *always place large tiles last* --> <binding template = "Tile. Square 150 x 150 Image" | "Tile. Square 150 x 150 Block" |. . . fallback? = "Tile. Square. Image" | "Tile. Square. Block" |. . . content. Id = "string" lang? = "string" base. Uri? = "any. URI" branding? = "string" add. Image. Query? = "boolean" > <!-- Some combination of image and text. id's used to de-dupe updates --> <image id = "integer" src = "string" alt? = "string" add. Image. Query? = "boolean" /> <text id = "integer" lang? = "string" /> </binding> </visual> </tile>
XML toast notification schema <? xml version="1. 0" encoding="utf-8" ? > <toast launch? = "string" duration? = "long" | "short" > <visual version? = "integer" lang? = "string" base. Uri? = "any. URI" branding? = "string" add. Image. Query? = "boolean" > <binding template = "Toast. Image. And. Text 01" | "Toast. Image. And. Text 02" |. . . ="" fallback? = "string" lang? = "string" base. Uri? = "any. URI" branding? = "string" add. Image. Query? = "boolean" > <!-- Some number of child elements --> <image id = "integer" src = "string" alt = "string" add. Image. Query? = "boolean" /> <text id = "integer" lang? = "string" /> </binding> </visual> <!-- Optional audio --> <audio src? = "ms-winsoundevent: Notification. Default" |. . . loop? = "boolean" silent? = "boolean" /> </toast>
Windows. UI. Start. Screen. Secondary. Tiles Secondary Tiles Sample
Windows. UI. Notifications
Windows. UI. Notifications
Windows. UI. Notifications
<m 2: Tile. Update Recurrence="half. Hour" Uri. Template="http: //my. service. com/tileupdates. aspx? lang={language}" />
Push. Notification. Channel. Push. Notification. Received Push. Notification. Trigger
Building a Cloud Service with Window Azure http: //bit. ly/Ygvi. PT
Renewing WNS channels (register task, C#) using Windows. Application. Model. Background; Background. Task. Builder task. Builder = new Background. Task. Builder(); Maintenance. Trigger trigger = new Maintenance. Trigger( 10 * 24 * 60, false); //10 * 24 * 60 == 10 days task. Builder. Set. Trigger(trigger); //In Java. Script, task. Entry. Point is the path of a. js file task. Builder. Task. Entry. Point = "Push. Notifications. Helper. Maintenance. Task"; task. Builder. Name = "Update. Channels"; System. Condition internet. Condition = new System. Condition( System. Condition. Type. Internet. Available); task. Builder. Add. Condition(internet. Condition); task. Builder. Register();
Renewing WNS channels (task, C#) using System; using System. Threading. Tasks; using Windows. Application. Model. Background; namespace Push. Notifications. Helper { public sealed class Maintenance. Task : IBackground. Task { public void Run(IBackground. Task. Instance task. Instance) { // This is a helper function to renew WNS channels. // Important here to not block the UI thread. Notifier notifier = new Notifier(); notifier. Renew. All. Async(false). As. Task(). Wait(); } } }
Renewing WNS channels (task, Java. Script) // This code runs as a web worker (function () { // Import the Notifier helper object import. Scripts("//Microsoft. Win. JS. 1. 0/js/base. js"); import. Scripts("notifications. js"); var close. Function = function () { close(); // This is worker. close }; var notifier = new Sample. Notifications. Notifier(); notifier. renew. All. Async(). done(close. Function, close. Function); })();
Receiving raw notification (register task, C#) using Windows. Application. Model. Background; using Windows. Networking. Push. Notifications; Background. Task. Builder task. Builder = new Background. Task. Builder(); Push. Notification. Trigger trigger = new Push. Notification. Trigger(); task. Builder. Set. Trigger(trigger); task. Builder. Task. Entry. Point = "Background. Tasks. Raw. Notification"; task. Builder. Name = "Receive. Raw. Notification"; task. Builder. Register();
Receiving raw notification (task, C#) using System. Diagnostics; Windows. Application. Model. Background; Windows. Networking. Push. Notifications; Windows. Storage; namespace Background. Tasks { public sealed class Raw. Notification : IBackground. Task { public void Run(IBackground. Task. Instance task. Instance) { // Get the background task details Application. Data. Container settings = Application. Data. Current. Local. Settings; // Store the content received from the notification so it // can be retrieved from the UI. Raw. Notification notification = (Raw. Notification)task. Instance. Trigger. Details; settings. Values[task. Name] = notification. Content; } } }
Alive with Activity: 3 -part series on the Windows Developer Blog Tiles and Notifications section Working with tiles, badges, and toast notifications Windows 8. 1 Samples Programming Windows 8 Apps in HTML, CSS, and Java. Script http: //aka. ms/Second. Edition/First. Preview
http: //dev. windows. com http: //design. windows. com/ Windows 8. 1 Samples http: //channel 9. msdn. com/Windows
- Slides: 36