1 / 38

Submit your evals online

Evaluations. Submit your evals online . http://europe.msteched.com/sessions. Live Tiles and Push Notifications. Ben Riga Technical Evangelist, Windows Phone Microsoft Corporation. Ben Riga. benriga@microsoft.com http://bit.ly/TopRanked twitter: @ benriga.

colista
Download Presentation

Submit your evals online

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Evaluations Submit your evals online http://europe.msteched.com/sessions

  2. Live Tiles and Push Notifications Ben RigaTechnical Evangelist, Windows Phone Microsoft Corporation

  3. Ben Riga benriga@microsoft.comhttp://bit.ly/TopRankedtwitter: @benriga

  4. Follow me on Twitter or the Puppy gets it@benriga

  5. Topics • End-User Experience • Tile 101 • Multiple Live Tiles • What about Windows Phone 8 • Updating a Live Tile from a background process • Push Notifications

  6. Consumer Experience • Windows phone has the unique ability to provide the end user glanceable access to the information they care most about, via Live Tiles • Push Notifications offer developers a way to send timely information to the end user’s device even when the application is not running, including Tile updates

  7. Tiles 101 • Shortcuts to apps • Static or dynamic • 2 sizes: small & large • Large only for 1st party apps • End-user is in control

  8. Data Driven Template Model • A fixed set of data properties • Each property corresponds to a UI element • Each UI element has a fixed position on screen • Not all elements need to be used • Animations are not extensible Background Image (173 x 173 .png) Title Count

  9. Scenarios/Popular Applications • Weather Apps • Weather Tile • Warning Toast • Chess by Post • Turn Tile • Move Toast • Beezz • Unread Tile • Direct Toast • Send to WP7 • Link Tile • Link Toast • AlphaJax • Turn Tile • Move Toast • Seattle Traffic Map • Traffic Tile There are hundreds and hundreds of Push apps in Marketplace!

  10. Primary and Secondary Tiles • Application Tile • Pinned from App List • Properties are set initially in the Application Manifest • Secondary Tile • New in Windows Phone 7.5! • Created as a result of user input in an application Front Back

  11. Live Tiles – Local Tile API • Local tile updates (these are *not* push) • Full control of all properties when your app is in the foreground or background • Calorie counter, sticky notes • Multi-Tile! • Deep-link to specific application sections • Launch directly to page/experience Application Tile Launches main app experience Secondary Tile Launches world news page Secondary Tile Launches local news page

  12. Live Tiles – Local Tile API Continued… • Back of tile updates • Full control of all properties when your app is in the foreground or background • Content, Title, Background • Flips from front to back at random interval • Smart logic to make flips asynchronous Content Content string is bigger Background Title Title

  13. What about Windows Phone 8?

  14. Windows Phone 8 - Tiles 8 Small – small image, count (shared) Medium – front/back medium image, count (shared), front/back title (shared), back content (distinct)*identical to Mango 8 8 Wide – optional, front/back wide image, count (shared), front/back title (shared), back content (distinct)

  15. Tiles Back Compat Story • Mango apps will get the small tile size for free in Windows Phone 8! • Absolutely zero work required - the default tile assets will be used for the small size for all app tiles (primary and secondary)

  16. Demo Live Tiles – Local Tile API

  17. Tile Schedule • Periodically updates the tile image without pushing message though • Updates images only from the web, not from the app local store • Sets up notification channel and binds it to a tile notification • Few limitations • Image size must be less than 80 KB • Download time must not exceed 60 seconds • Lowest update time resolution is 60 minutes • If the schedule for an indefinite or finite number of updates fails too many times, OS will cancel it • Update recurrence can by Onetime, EveryHour, EveryDay, EveryWeek or EveryMonth

  18. Scheduling Tile Update • public partial class MainPage : PhoneApplicationPage { •     private ShellTileSchedule _mySchedule; •     public MainPage()   { • InitializeComponent(); • ScheduleTile(); •     } •      private void ScheduleTile()    { •         _mySchedule = new ShellTileSchedule(); •         _mySchedule.Recurrence = UpdateRecurrence.Onetime; •         _mySchedule.StartTime = DateTime.Now; •         _mySchedule.RemoteImageUri = new • Uri("http://cdn3.afterdawn.fi/news/small/windows-phone-7-series.png"); •         _mySchedule.Start(); •     } • }

  19. Updating Tiles from a Background Agent • In Windows Phone OS 7.0, only way of updating Live Tiles was from a Tile Schedule or from Notifications • Tile Schedule needs to fetch images from a web URI • Notifications require you to implement a backend service • To have control of shell tiles when the app is not running without using Push Notifications, a good solution is a Background Agent • Use the ShellTile API to locate and update tiles • Don’t take a dependency on this • User or system could halt your background process • Remember that Background Agents expire after 2 weeks • Let the User know

  20. Demo Updating Tiles from a Background Agent

  21. Push Notifications • Server-initiated communication • Enable key background scenarios • Preserve battery life and user experience • Prevent polling for updates

  22. Push Notification Data Flow - Setup 2 URI to the service: "http://notify.live.com/throttledthirdparty/01.00/AAFRQHgiiMWNTYrRDXAHQtz-AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA" Push enabled applications 3rd party service NotificationService 1 Push endpoint is established. URI is created for the endpoint. Microsoft hosted server

  23. Push Notification Data Flow - Notification Push enabled applications 3rd party service 4 NotificationService Send PN Message 3 HTTP POST the message Microsoft hosted server

  24. Three Kinds of Notifications • Raw • Notification message content is application-specific • Delivered directly to app only if it is running • Toast • Specific XML schema • Content delivered to app if it is running • If app is not running, system displays Toast popup using notification message content • Tile • Specific XML schema • Never delivered to app • If user has pinned app tile to Start screen, system updates it using notification message content

  25. Toast Notification • App icon and two text fields • Time critical and personally relevant • Users must opt-in via app UI

  26. Demo Push Notifications

  27. Response Custom Headers • Response Code: HTTP status code (200 OK) • Notification Status • Notification received by the Push Notification Service • For example: “X-NotificationStatus:Received” • DeviceConnectionStatus • The connection status of the device • //For example: X-DeviceConnectionStatus:Connected • SubscriptionStatus • The subscription status • //For example: X-SubscriptionStatus:Active • More information • http://msdn.microsoft.com/en-us/library/ff402545(v=VS.92).aspx

  28. Security Technical Details • Two levels of trust • Authentication: • Phone Client – MS server : • TLS + WL Device ID • MS Server – 3rd party service: • HTTPs (for third-party) • Throttling for unauthenticated services • Authorization: • Token (notification URI) validated with each PUSH notification

  29. Summary • In this session we covered how tiles work, live tiles, shell tiles as well as how to support multiple tiles from a single application. • We also covered updating a Live Tile from a Background Application as well as via Push Notifications

  30. Follow me on Twitter or the Puppy gets it@benriga

  31. Ben Riga benriga@microsoft.comhttp://bit.ly/TopRankedtwitter: @benriga

  32. Windows Phone Sessions • Tuesday • Thursday • Wednesday • Friday

  33. Resources Learning TechNet • Connect. Share. Discuss. • Microsoft Certification & Training Resources http://europe.msteched.com www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers • http://microsoft.com/technet http://microsoft.com/msdn

  34. Evaluations Submit your evals online http://europe.msteched.com/sessions

  35. Nokia Lumia 900 Prize Question: Name 4 ways to update a Live Tile on Windows Phone

  36. Q&A Ben RigaTechnical Evangelist, Windows Phone Microsoft Corporation

  37. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

More Related