lev's kc-dc presentation
TRANSCRIPT
Using Windows 10 Integration FeaturesGETTING TO KNOW LIVE TILES, ACTION CENTER AND CORTANA
LEV GINSBURG – GARMIN INTERNATIONAL
Agenda Who am I?
Live Tiles
Notifications & Action Center
Cortana
References and Q&A
Who am I? Lev Ginsburg
◦ Graduated University of Nebraska-Lincoln in 2010◦ Software Engineer at Garmin
◦ Going into 6th year◦ Primarily Windows Development
◦ WPF desktop apps◦ Garmin Connect Mobile for Windows 10
Agenda Who am I?
Live Tiles
Notifications & Action Center
Cortana
References and Q&A
Live Tiles (from Start) User Interaction Modes
◦ Glance◦ Quickly check on new information from an app before launching
◦ Go◦ Start is where user tasks begin, the doorway into the app
Live Tile Layouts Custom layout Grid
◦ The smallest tile has a 4 pixel gutter around each edge
◦ Each larger tile is the sum of the smaller units, plus the gutters between them
Small (1x1 effective)
Medium (2x2)
Wide (4x2)
Large (4x4)(desktop only)
4 px gutter
Live Tile Layout (sample)<tile> <visual> <binding template="TileMedium" branding="logo"> <group> <subgroup> <text hint-style="caption">Kelsey</text> <text hint-style="captionsubtle">Photos from our trip</text> <text hint-style="captionsubtle">Check out these awesome photos I took while in New Zealand!</text> </subgroup> </group> <group> <subgroup> <text hint-style="caption">Amy W</text> <text hint-style="captionsubtle">KCDC 2015 Dinner</text> <text hint-style="captionsubtle">Want to go out for dinner after KCDC tonight?</text> </subgroup> </group> </binding>
<binding template="TileLarge" branding="nameAndLogo"> <!-- same content the TileMedium template --> </binding> </visual></tile>
Live Tile States
Basic StateDefault, simple stateHighlights app branding
Semi-Live StateShows badge notification
Live StateAllows timely, relevant contentUsers can make informed decision about launching the app
Live Tile Customization Possibilities for Live Tiles are almost endless!
◦ Display Text, Images, or both
Assets will scale, leave text out of images
Inline Image and Text Groups
Background Image
Inline Image and Text Columns
Text Text Columns
Agenda Who am I?
Live Tiles
Notifications & Action Center
Cortana
References and Q&A
Notifications & Action Center User Interaction Modes
◦ Glance◦ See new information from your app
◦ Action◦ The toast is a doorway into the app (by clicking)◦ Custom actions allow simple tasks to be performed without leaving current app
Action Center in Windows 10 Toasts go into the Action Center
Toasts can be expanded
Individual notifications can be clicked
Remove◦ Individual notification◦ All from app group◦ All
Alarms/Reminders now in Action Center
Adaptive Toast Template Very similar to Live Tiles
Useful for notifications from app, reminders, alarms
<toast> <visual> <binding template="ToastGeneric"> <text>Hello World</text> <text>This is a simple toast message</text> </binding> </visual></toast>
Sample XML
Adaptive Notification States Collapsed vs Expanded
◦ Show brief summary view and allow user to see deeper context
Notification Actions Users can interact with notifications
◦ Accept/decline invitations◦ Respond to text messages/emails◦ Snooze/Dismiss alerts◦ Select response item from drop down
<toast launch="action=viewFriendRequest&userId=<id>"> <visual> <binding template="ToastGeneric"> <text>Matt sent you a friend request</text> <text>Matt S. Would like to be friends. Would you like to connect with him?</text> </binding> </visual>
<actions> <action content="Accept" activationType="background" arguments="action=acceptFriendRequest&userId=<id>"/> <action content="Decline" activationType="background" arguments="action=declineFriendRequest&userId=<id>"/> </actions></toast>
Sample XML
Notification Responses Can respond either in foreground or background task
◦ Should dismiss notification as action is performed◦ Foreground
◦ Launch to specific section of app related to notification◦ Background
◦ Perform user-specified task without changing user context
Notifications
Demo Time
Agenda Who am I?
Live Tiles
Notifications & Action Center
Cortana
References and Q&A
Cortana “World’s most personal digital assistant” – Microsoft
Available across PC’s, tablets, and phones
Available for use by developers
Voice Commands with Cortana Apps can register to handle Cortana voice commands
Cortana will automatically recognize the spoken context for your app
Voice Command Definition<?xml version="1.0" encoding="utf-8"?><VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2"> <CommandSet xml:lang="en-us" Name=“en-us-MyCommandSet"> <AppName>Sample</AppName> <Example>Give me a random number.</Example>
<Command Name="randomNumber"> <Example>Give me a random number.</Example> <ListenFor>Give [me] a random number.</ListenFor> <Feedback>Generating a random number...</Feedback> <Navigate /> </Command> </CommandSet></VoiceCommands>
[me] – optional word{var} – variable placeholder
Register the VCD file with VoiceCommands.VoiceCommandDefinitionManager
Voice Command Definition Make sure your VCD installed correctly
◦ Check your VCD commands in Cortana help◦ Full VCD example list available by clicking into your app
Respond using Cortana Add extension to Package.appxmanifest
Add new Command <Command Name="randomNumber"> <Example>Give me a random number.</Example> <ListenFor>Give [me] a random number.</ListenFor> <Feedback>Generating a random number...</Feedback> <VoiceCommandService Target=“SampleVCS" /> </Command>
<Extensions> <uap:Extension Category="windows.appService" EntryPoint="Sample.VoiceCommands.SampleVoiceCommandService"> <uap:AppService Name=" SampleVCS"/> </uap:Extension> <uap:Extension Category="windows.personalAssistantLaunch"/> </Extensions>
Respond using Cortana Implement SampleVoiceCommandService as IBackgroundTask
namespace Sample.VoiceCommands { public sealed class SampleVoiceCommandService : IBackgroundTask { public async void Run(IBackgroundTaskInstance taskInstance) { ... } }}
Cortana
Demo Time
Agenda Who am I?
Live Tiles
Notifications & Action Center
Cortana
References and Q&A
References Tiles, Notifications and Action Center – Build 2015
◦ https://channel9.msdn.com/Events/Build/2015/2-762
Cortana Extensibility – Build 2015◦ https://channel9.msdn.com/Events/Build/2015/2-691
Tiles and Toasts – MSDN Blogs◦ http://
blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/02/adaptive-and-interactive-toast-notifications-for-windows-10.aspx
◦ http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/08/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10.aspx
Questions?