Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live.

Similar presentations


Presentation on theme: "Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live."— Presentation transcript:

1

2

3

4 Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live State Plate App Icon Short Name Badge Content Plate Short Name Badge App Icon Content

5

6 // build badge var type = BadgeTemplateType.BadgeNumber; var xml = BadgeUpdateManager.GetTemplateContent(type); // update element var elements = xml.GetElementsByTagName("badge"); var element = elements[0] as Windows.Data.Xml.Dom.XmlElement; element.SetAttribute("value", "47"); // send to lock screen var updator = BadgeUpdateManager.CreateBadgeUpdaterForApplication(); var notification = new BadgeNotification(xml); updator.Update(notification);

7 var tileId = "DetailsTile"; var pinned = SecondaryTile.Exists(tileId); if (!pinned) { var tile = new SecondaryTile(tileId) { DisplayName = "Record details", Arguments = "123" }; // extra details var success = await tile.RequestCreateAsync(); }

8

9

10

11 Please don’t say more templates.

12

13 John Doe Photos from our trip Thought you might… … Min. Med Size Max Med. Size

14 Microsoft HoloLens: A Sensational Vision of the PC’s Future Min. Med SizeMax Med. Size

15

16

17

18

19

20

21

22

23

24 // build toast var template = ToastTemplateType.ToastText01; var xml = ToastNotificationManager.GetTemplateContent(template); xml.DocumentElement.SetAttribute("launch", "Args"); // set value var text = xml.CreateTextNode(content); var elements = xml.GetElementsByTagName("text"); elements[0].AppendChild(text); // show toast var toast = new ToastNotification(xml); var notifier = ToastNotificationManager.CreateToastNotifier(); notifier.Show(toast);

25

26

27

28

29 <image placement="appLogoOverride" src="Torrance Shum.png" /> Torrance Shum Media content attached. <image placement="inline" src="attachment.png" /> Hey check out this photo. Isn’t it awesome?

30 ... <input title="Snooze for" id="snoozeTime" type="selections" defaultSelection="5">...

31 ......

32 ......... <action activationType="background" arguments="dismiss" imageUri="send.png" hint-inputId="1" />

33 Tap buttonApp launchesRetrieve ArgsTake actions Tap buttonTask launchesRetrieve ArgsTake actions Tap buttonProtocol activatesWeb / app Tap buttonSystem handles

34

35 ...

36

37

38 {app-specific data}

39

40 1.Request Channel URI 2.Register with your Cloud Service 3.Authenticate & Push Notification My Developer Service Windows Push Notification Service

41

42 void gotNotification(PushNotificationChannel sender, PushNotificationReceivedEventArgs args) { Debug.WriteLine(args.NotificationType.ToString()); } var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); SaveUriForNotificationService(channel.Uri); channel.PushNotificationReceived +=channel_PushNotificationReceived;

43

44

45

46

47

48

49 ToastNotificationHistory tnh = ToastNotificationManager.History; tnh.Remove("Windows 10 Toast #1"); tnh.RemoveGroup("JumpStart");

50

51 App, Action Center and Tile must tell a consistent story

52

53 // Background task for a ToastNotificationHistoryChangedTrigger public sealed class ActionCenterChangedTask: IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { var toasts = ToastNotificationManager.History.GetHistory(); if (toasts != null) { var count = toasts.Count(); if (count== 0) { BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear(); } else { XmlDocument badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber); XmlElement badgeElement = (XmlElement)badgeXml.SelectSingleNode("/badge"); badgeElement.SetAttribute("value", count.ToString()); BadgeNotification badge = new BadgeNotification(badgeXml); BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badge); }

54


Download ppt "Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live."

Similar presentations


Ads by Google