310 likes | 543 Views
Tiles, Notifications, and Azure Mobile Services. Peter Dwersteg peterdw@microsoft.com @ PeterDwersteg Technical Evangelist Microsoft. Make your app alive with activity using Tiles and Notifications. demo . Start Screen. Tiles. Basic Tiles. Both sizes can have live updates.
E N D
Tiles, Notifications, and Azure Mobile Services Peter Dwersteg peterdw@microsoft.com @PeterDwersteg Technical Evangelist Microsoft
Make your app alivewith activity using Tiles and Notifications
demo Start Screen
Basic Tiles Both sizes can have live updates Tap on tile to launch or switch to an app Static default tile specified in app manifest Two sizes: Wide (2x1) Square (1x1)
Live Tiles Tiles updated using pre-defined templates Templates provide rich rendering options Text-only, image-only or combination Local, Scheduled, Periodic and Push updates JPEG, GIF, or PNG, max size 200 KB Optional “peek” animation
Notification Queuing By default only last notification shown Opt-in to automatically cycle tile through last five notifications
Secondary Tiles Tiles created by “pinning” content from app Pin initiated by app via simple runtime call User confirms pin operation via system UI Exposes a personalized surface for app Same capabilities as app tiles Launch leads to relevant content
demo Secondary Tiles
Toast Notifications Allows quick navigation to a contextually relevant location in your app Toast notifications deliver transient messages outside the context of the app Use toast notifications to get the user’s attention immediately User is in control and can permanently turn off toast notifications from your app The best toast are personally relevant and time sensitive
Toast Templates Toast notifications use the same template architecture as Live Tiles Rich set of rendering options available
demo Toast Notifications
Notification Delivery Mechanisms Local Scheduled Periodic Push Update tiles and badges at a fixed time interval by polling a cloud service for new content. Notifications sent directly from a cloud server to an individual user, at a time of the server’s choosing. Send notifications while your app is running. Schedule a notification update in advance at the precise time you specify.
Periodic Tile Updates // update the tile poll URL varpolledUri = new Uri("http://www.contoso.com/tile.xml"); varrecurrence = Windows.UI.Notifications.PeriodicUpdateRecurrence.HalfHour; vartileUpdater = Windows.UI.Notifications.TileUpdateManager.CreateTileUpdaterForApplication(); tileUpdater.StartPeriodicUpdate(polledUri, recurrence);
Windows Push Notification Service Enables delivery of tile and toast notifications over the internet Tile updates and notifications shown to the user even if your app is not running WNS handles communication with your app Scales to millions of users WNS is a free service for your app to use
Push Notification Overview Windows 8 Cloud Service Request Channel URI Register with your Cloud Service Authenticate &Push Notification WindowsStore App 2 3 1 Notification Client Platform Windows Notification Service 3
What is Windows Azure Mobile Services? Auth Data Notifications Logging & Diag Server Logic Scheduler Scale
demo Sending Notifications using WNS and Windows Azure Mobile Services
When Should I Update my Tile or Toast? Push Personalized, real-time status e.g. a friend achieves a new high score within a game we share e.g. comments on my photo Subscribed tailored content updates Push e.g. ongoing sporting event scores e.g. breaking news Application launch/usage Local / Push e.g. update app tile to match more recent app content e.g. clearing the unread mail count when mail is opened Periodically for non-personalized content Periodic e.g. every 30 minutes for stock or weather updates Missed toast notifications Local / Push e.g. missed phone calls in a VOIP app
How Should I Not Update My Tile? Avoid high frequency, streaming updates e.g. every minute to report a play-by-play sporting event e.g. real-time stock ticker on the tile Do not clear the tile when the app launches/exits Leave content on the tile to draw your user back to the app. It is okay to update the tile on app exit, however. Do not update to explicitly replace ‘old content’ Set the optional expirationon the tile at the time it is sent. Only send new updates if there is new data to show the user. Do not depend on tile ordering Notification queue tile display order is not guaranteed – “storyboards” will not work on tiles. Tile updates must be independent of one another.
Make your app alive with activityusing Tiles and NotificationsUse Periodic, Push or ScheduledNotifications when app is not runningLeverage Windows Azure to provide cloud service infrastructure
Resources Windows 8 Developer Documentation Download the Windows Azure Toolkit for Windows 8 Register your app http://manage.dev.live.com/build http://msdn.microsoft.com/en-us/windows/apps • http://watwindows8.codeplex.com