Agenda Tile basics Tile templates Adaptive templates Toast

Slides:



Advertisements
Similar presentations
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Advertisements

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Tony 684 User Data App Services Arun 765 Thomas 762 Shell Kernel Shawn 626 App Roberth 779 Enterprise John Ignite Store Barclay 695 Andrew 617 App.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
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.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Sr. Dir. – Systems Architecture Inlet Technologies.
Demo Fest of Some Leading Store Apps Module 2.

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.
07 | Live tiles & notifications
S4 Solution Specialist Sales Summit
Start, Tiles, Notifications and Lock Screen
Build /4/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Build /4/2018 6:08 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Microsoft Dynamics NAV 2018 – what’s new
Integrate Power BI with Microsoft Dynamics
Automate all things! Microsoft Azure continuous deployment
Возможности Excel 2010, о которых следует знать
Microsoft Build /8/2018 8:41 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Azure Active Directory
FeedSync And Live Mesh Sync Services
Title of Presentation 11/22/2018 3:34 PM
Microsoft Build /24/2018 2:23 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
MIX 09 11/24/2018 9:18 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Tooling and Diagnostics
Web Site Web App Web API microsoftazurepass.com
12/2/ :23 PM APP-410T Real time communication: keep your Metro style app connected whether it is running or suspended Raghu Gatta Principal Development.
Title of Presentation 12/2/2018 3:48 PM
Developer's guide to Windows 10 Insider Preview Andy & Jerry
TechEd /6/2018 8:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows SDK for Facebook
File Picker for OneDrive and OneDrive for Business
File type associations and AutoPlay
1/16/2019 8:14 PM SAC-863T Delivering notifications with the Windows Push Notification Service and Windows Azure Darren Louie, Nick Harris Program Manager,
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Using tiles and notifications
SharePoint 2013 Authentication with Azure – Part 1
Windows 8 Security Internals
4/20/2019 Share © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
Microsoft Build /20/ :42 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
WINDOWS AZURE A LAP AROUND PLATFORM THE Steve Marx
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Diagnostics and troubleshooting in Azure App Service Support Center
Title of Presentation 5/24/2019 1:26 PM
Developing Mobile Solutions with Windows Azure Part II
Title of Presentation 7/24/2019 8:53 PM
Build /27/2019 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
Erik Porter Program Manager ASP.NET Microsoft Corporation
WCL425 App Compat for Nerds Chris Jackson.
Presentation transcript:

Live Tiles, Push Notifications and Action Center Developer’s Guide to Windows 10

Agenda Tile basics Tile templates Adaptive templates Toast Interactive toast Push Notifications Action Center

Tile basics

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

Primary Tile

Updating tiles Scheduled Periodic Local Push Set template and time with “ScheduledTileNotification” Periodic Pull from URL 30m / 60m / 6h / 12h / 24h Local Update from (foreground/background) app Push Use push services Update badge

Update tile badge // 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);

Create a secondary tile 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(); }

Tile templates

Legacy templates If a template meets your needs, go ahead and use it. Previous templates remain Phone and Windows templates have been merged There are over 80 templates available

Please don’t say more templates.

Adaptive templates

Adaptive tiles <tile> <visual> <binding template="TileMedium"> <group> <subgroup> <text hint-style="subtitle">John Doe</text> <text hint-style="subtle">Photos from our trip</text> <text hint-style="subtle">Thought you might…</text> </subgroup> </group> … </binding> </visual> </tile> Min. Med Size Max Med. Size

Adaptive tiles <tile> <visual> <binding template="TileMedium"> <image source="Assets\image.png" placement="background" /> <text hint-wrap="true"> Microsoft HoloLens: A Sensational Vision of the PC’s Future </text> </binding> </visual> </tile> Min. Med Size Max Med. Size

Sample: Small Tile <binding template="TileSmall" branding="none" hint-textStacking="center"> </binding>

Sample: Medium Tile <binding template="TileMedium" branding="Name" displayName="Hipstame"> <text hint-style="caption"> 9:50 AM, Wednesday</text> <text hint-style="captionsubtle" hint-wrap="true"> 263 Grove St, San Francisco, CA 94102</text> </binding>

Sample: Wide Tile <binding template="TileWide" displayName="Hipstame"> <group> <subgroup hint-weight="33"> <image placement="inline" src="http://image.jpg" /> </subgroup> <subgroup> <text hint-style="caption"> 9:50 AM, Wednesday</text> <text hint-style="captionsubtle" hint-wrap="true" hint-maxLines="3"> 263 Grove St, San Francisco, CA 94102</text> </group> </binding>

Sample: Large Tile <binding template="TileLarge" displayName="Hipstame"> <group> <subgroup hint-weight="33"> <image placement="inline" src="http://image.jpg" /> </subgroup> <subgroup> <text hint-style="caption"> 9:50 AM, Wednesday</text> <text hint-style="captionsubtle" hint-wrap="true" hint-maxLines="3"> 263 Grove St, San Francisco, CA 94102</text> </group> <image placement="inline" src="http://map.jpg"/> </binding>

Toast

Toasts Glance (consume) Act (chase, or take actions) See new information from your apps. Act (chase, or take actions) Toasts invite you to begin or complete a task. The toast is the app’s door by chasing (clicking) it. Additional actions enable users to perform simple tasks without context switching.

Toast templates If a template meets your needs, go ahead and use it. Previous templates remain Phone and Windows templates have been merged Adaptive template Same XML syntax as tiles

Sending toast Scheduled Local Push Set template and time with “ScheduledToastNotification” Toast can also be set to be recurring. Local Send from (foreground/background) app This includes desktop apps with “AppUserModelID” Push Use push services

Sending toast // 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);

Interactive toast

Interactive toast Desktop Mobile

Toast notifications <toast> <visual> <binding template="ToastGeneric"> <image placement="appLogoOverride" src="Torrance Shum.png" /> <text>Torrance Shum</text> <text>Media content attached.</text> <image placement="inline" src="attachment.png" /> <text>Hey check out this photo. Isn’t it awesome?</text> </binding> </visual> </toast>

Toast input <toast> ... <actions> <input title="Snooze for" id="snoozeTime" type="selections" defaultSelection="5"> <selection id="5" content="5 minutes" /> <selection id="10" content="10 minutes" /> <selection id="20" content="20 minutes" /> </input> </actions> </toast>

Toast action <toast> ... <actions> <action activationType="system" arguments="snooze" hint-inputId="snoozeTime" content=""/> <action activationType="system" arguments="dismiss" content=""/> </actions> </toast>

Toast customization <toast> ... <image placement="appLogoOverride" src="Logo.png" /> <actions> <action activationType="background" arguments="dismiss" imageUri="send.png" hint-inputId="1" /> </actions> </toast>

New activation types & activations Build 2015 11/13/2018 1:58 PM New activation types & activations <action activationType="foreground" /> <action activationType="background" /> <action activationType="protocol" /> <action activationType="system" /> Tap button App launches Retrieve Args Take actions Tap button Task launches Retrieve Args Take actions Tap button Protocol activates Web / app Tap button System handles © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Special Toast Scenarios Alarm <toast scenario="alarm"...> Reminder <toast scenario="reminder"...> Incoming Call <toast scenario="incomingCall"...>

Alarms are Toasts <toast scenario="alarm"...> <visual> ... <actions> <action activationType='system' arguments='snooze' content='' /> <action activationType='system' arguments='dismiss' content=''/> </actions> </toast>

Demo: Interactive Toast

Push Notifications

Notifications Lots of ways to make use of notifications Raw Tile Badge 11/13/2018 Notifications Lots of ways to make use of notifications Raw (background task) Tile Badge Toast {app-specific data} © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows Notification Service One service across Windows devices One process to register an app for push One tile template to push to Windows & Phone apps

WNS – Push Architecture Windows Windows Notification Client Platform My Windows App My Developer Service Request Channel URI Register with your Cloud Service Authenticate & Push Notification 2 3 1 Windows Push Notification Service 3

Setting Up An App For Push (Visual Studio)

Getting a Push Notification Channel Get Channel URL var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); SaveUriForNotificationService(channel.Uri); channel.PushNotificationReceived +=channel_PushNotificationReceived; void gotNotification(PushNotificationChannel sender, PushNotificationReceivedEventArgs args) { Debug.WriteLine(args.NotificationType.ToString()); }

Testing Push Notifications Sample Azure Web app for Push Notifications: Website: http://pushtestserver.azurewebsites.net/wns/ Code: https://code.msdn.microsoft.com/windowsazure/WNS-for-Windows-and-83fd21f6

Notifications Simulation Engine

Push Notifications demo

Push payloads All the same notifications that you can send locally from within your app Tile Toast Badge Raw All the same templates ‘Traditional’ templates from the template catalog New flexible templates

Action Center managing your notification space

Action center & Quick actions

Action Center Management APIs Manage app notifications Developers can: Remove one or many notifications Tag and group notifications Replace a notification with a new one Set an expiration on notifications Send “Ghost Toast” notifications (only show up in the notification center) ToastNotificationHistory tnh = ToastNotificationManager.History; tnh.Remove("Windows 10 Toast #1"); tnh.RemoveGroup("JumpStart");

Apps’ Responsibilities on Notifications Apps can inform user of ‘unread’ items in different ways Count on a tile Listed in Action Center App + Action Center + Tile(s) must tell a consistent story for good user experience User taps on toast popup or in Action Center -> App opens at corresponding item? User opens app and reads unread items -> Notification in Action Center removed? User dismisses Action Center notification -> Tile Badge count changes?

App, Action Center and Tile must tell a consistent story

Action Center change triggers ToastNotificationHistoryChangedTrigger Fires whenever a user dismisses a notification from Action Center Or when an app adds or removes or replaces a notification Use to trigger a Background task in which you can maintain consistency of unactioned item counts in app state and on Tiles

Action Center change trigger // 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);