SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Live Tiles and
Push
Notifications
Dave Bost
dave.bost@microsoft.com
http://davebost.com | @davebost
Topics
• End-User Experience
• Tile 101
• Multiple Live Tiles
• Updating a Live Tile from a background process
• Push Notifications




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



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




Windows Phone
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       Title   Count
       Image
  (173 x 173 .png)
Windows Phone
Scenarios/Popular Applications

   Weather Apps            Send to WP7
        Weather Tile          Link Tile
        Warning Toast         Link Toast
   Chess by Post           AlphaJax
      Turn Tile               Turn Tile
      Move Toast              Move Toast
   Beezz                   Seattle Traffic Map
      Unread Tile               Traffic Tile
      Direct Toast




Windows Phone
Primary and Secondary Tiles
• Application Tile                                         Fron
                                                           t
     –   Pinned from App List
     –   Properties are set initially in the Application
         Manifest

                                                           Ba
• Secondary Tile                                           ck
     –   New in Windows Phone 7.5!
     –   Created as a result of user input in an
         application



Windows Phone
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




Windows Phone
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

     Content     Content
     string is                                 Background
     bigger
                           Title   Title


     – Flips from front to back at random interval
     – Smart logic to make flips asynchronous



Windows Phone
Demo


Demo 1: Live Tiles – Local Tile API
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,
Windows Phone
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();
    }
}




Windows Phone
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




Windows Phone
Demo


Demo 2: Updating Tiles from a
Background Agent
Push Notifications
• Server-initiated communication
• Enable key background scenarios
• Preserve battery life and user experience
• Prevent polling for updates




Windows Phone
Push Notification Data Flow

                                2                 URI to the service:
                                    "http://notify.live.com/throttledthirdparty/01.00/AAFRQH        3rd party
            Push enabled                               giiMWNTYrRDXAHQtz-                            service
                                    AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA
             applications                                          "
                                                                                                    3
                Notifications
                  service                                                                      HTTP POST the
                                                              4                                  message
                                                                       Send PN
                                                                       Message
1
       Push endpoint is established. URI is
            created for the endpoint.
                                                                                                   Microsoft
                                                                                                     hosted
                                                                                                     server




Windows Phone
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

Windows Phone
Push Notifications – New
Features
• Multi-Tile/Back of Tile Support
     –   Multiple weather locations, news categories, sports
         team scores, twitter favorites
     –   Can update all tiles belonging to your application
• No API Change for binding tiles
     –   BindToShellTile now binds you to all tiles
     –   Send Tile ID to service and use new attribute to direct
         update
• Three new elements for back of tile properties


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




Windows Phone
Demo


Demo 3: Push Notifications
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

Windows Phone
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

Windows Phone
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




Windows Phone
Q&A
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.




© 2011 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.

Weitere ähnliche Inhalte

Ähnlich wie Live Tiles and Notifications in Windows Phone

follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
QIRIS
 
Windows 8 DevUnleashed - Session 3
Windows 8 DevUnleashed - Session 3Windows 8 DevUnleashed - Session 3
Windows 8 DevUnleashed - Session 3
drudolph11
 
Windows Phone Code Camp Montreal - Push Notifications and Live Tiles
Windows Phone Code Camp Montreal - Push Notifications and Live TilesWindows Phone Code Camp Montreal - Push Notifications and Live Tiles
Windows Phone Code Camp Montreal - Push Notifications and Live Tiles
Frédéric Harper
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push Notifications
Mike Willbanks
 
In tune inaction
In tune inactionIn tune inaction
In tune inaction
Olav Tvedt
 
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen NotificationsWindows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
Oliver Scheer
 

Ähnlich wie Live Tiles and Notifications in Windows Phone (20)

follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
 
Windows 8 DevUnleashed - Session 3
Windows 8 DevUnleashed - Session 3Windows 8 DevUnleashed - Session 3
Windows 8 DevUnleashed - Session 3
 
Developing windows phone 7 application with silverlight
Developing windows phone 7 application with silverlightDeveloping windows phone 7 application with silverlight
Developing windows phone 7 application with silverlight
 
Windows Phone Code Camp Montreal - Push Notifications and Live Tiles
Windows Phone Code Camp Montreal - Push Notifications and Live TilesWindows Phone Code Camp Montreal - Push Notifications and Live Tiles
Windows Phone Code Camp Montreal - Push Notifications and Live Tiles
 
08.Push Notifications
08.Push Notifications 08.Push Notifications
08.Push Notifications
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push Notifications
 
Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...Developing Interactive Applications Using Windows Live Robots, Activities, an...
Developing Interactive Applications Using Windows Live Robots, Activities, an...
 
Azure notification hubs
Azure notification hubsAzure notification hubs
Azure notification hubs
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
 
Developing Apps for Windows Phone 8
Developing Apps for Windows Phone 8Developing Apps for Windows Phone 8
Developing Apps for Windows Phone 8
 
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"  Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
 
Introducing the Windows Phone 8.1 App Development Platform
Introducing the Windows Phone 8.1 App Development PlatformIntroducing the Windows Phone 8.1 App Development Platform
Introducing the Windows Phone 8.1 App Development Platform
 
Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
 
In tune inaction
In tune inactionIn tune inaction
In tune inaction
 
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen NotificationsWindows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
 
Windows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 PreviewWindows Phone Concept - 7.1 & 8 Preview
Windows Phone Concept - 7.1 & 8 Preview
 
S#01 김영욱
S#01 김영욱 S#01 김영욱
S#01 김영욱
 
Cross Platform Mobile Push Notifications with Azure Notifications Hub
Cross Platform Mobile Push Notifications with Azure Notifications HubCross Platform Mobile Push Notifications with Azure Notifications Hub
Cross Platform Mobile Push Notifications with Azure Notifications Hub
 
Windows Phone Introduction
Windows Phone IntroductionWindows Phone Introduction
Windows Phone Introduction
 

Mehr von Dave Bost

Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8
Dave Bost
 
Microsoft+PHP: Make Web Not War
Microsoft+PHP: Make Web Not WarMicrosoft+PHP: Make Web Not War
Microsoft+PHP: Make Web Not War
Dave Bost
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
Dave Bost
 

Mehr von Dave Bost (15)

Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8Developing for Windows Phone 8 and Windows 8
Developing for Windows Phone 8 and Windows 8
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Microsoft+PHP: Make Web Not War
Microsoft+PHP: Make Web Not WarMicrosoft+PHP: Make Web Not War
Microsoft+PHP: Make Web Not War
 
The Windows Azure Platform (MSDN Events Series)
The Windows Azure Platform (MSDN Events Series)The Windows Azure Platform (MSDN Events Series)
The Windows Azure Platform (MSDN Events Series)
 
Azure - The Next Frontier
Azure - The Next FrontierAzure - The Next Frontier
Azure - The Next Frontier
 
Internet Explorer 8 Developer Overview
Internet Explorer 8 Developer OverviewInternet Explorer 8 Developer Overview
Internet Explorer 8 Developer Overview
 
Windows 7 Developer Overview
Windows 7 Developer OverviewWindows 7 Developer Overview
Windows 7 Developer Overview
 
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
 
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
 
Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2
 
Building Applications for SQL Server 2008
Building Applications for SQL Server 2008Building Applications for SQL Server 2008
Building Applications for SQL Server 2008
 
A Lap Around Windows Azure
A Lap Around Windows AzureA Lap Around Windows Azure
A Lap Around Windows Azure
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
A Tour of CodePlex
A Tour of CodePlexA Tour of CodePlex
A Tour of CodePlex
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Live Tiles and Notifications in Windows Phone

  • 1. Live Tiles and Push Notifications Dave Bost dave.bost@microsoft.com http://davebost.com | @davebost
  • 2. Topics • End-User Experience • Tile 101 • Multiple Live Tiles • Updating a Live Tile from a background process • Push Notifications Windows Phone
  • 3. Consumer Experience Notifications offer Windows phone has developers a way to the unique ability to send timely provide the end information to the user glanceable end user’s device access to the even when the information they application is not care most about, via running, including Live Tiles Tile updates Windows Phone
  • 4. Tiles 101 • Shortcuts to apps • Static or dynamic • 2 sizes: small & large – Large only for 1st party apps • End-user is in control Windows Phone
  • 5. 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 Title Count Image (173 x 173 .png) Windows Phone
  • 6. Scenarios/Popular Applications  Weather Apps  Send to WP7  Weather Tile  Link Tile  Warning Toast  Link Toast  Chess by Post  AlphaJax  Turn Tile  Turn Tile  Move Toast  Move Toast  Beezz  Seattle Traffic Map  Unread Tile  Traffic Tile  Direct Toast Windows Phone
  • 7. Primary and Secondary Tiles • Application Tile Fron t – Pinned from App List – Properties are set initially in the Application Manifest Ba • Secondary Tile ck – New in Windows Phone 7.5! – Created as a result of user input in an application Windows Phone
  • 8. 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 Windows Phone
  • 9. 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 Content Content string is Background bigger Title Title – Flips from front to back at random interval – Smart logic to make flips asynchronous Windows Phone
  • 10. Demo Demo 1: Live Tiles – Local Tile API
  • 11. 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, Windows Phone
  • 12. 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(); } } Windows Phone
  • 13. 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 Windows Phone
  • 14. Demo Demo 2: Updating Tiles from a Background Agent
  • 15. Push Notifications • Server-initiated communication • Enable key background scenarios • Preserve battery life and user experience • Prevent polling for updates Windows Phone
  • 16. Push Notification Data Flow 2 URI to the service: "http://notify.live.com/throttledthirdparty/01.00/AAFRQH 3rd party Push enabled giiMWNTYrRDXAHQtz- service AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA applications " 3 Notifications service HTTP POST the 4 message Send PN Message 1 Push endpoint is established. URI is created for the endpoint. Microsoft hosted server Windows Phone
  • 17. 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 Windows Phone
  • 18. Push Notifications – New Features • Multi-Tile/Back of Tile Support – Multiple weather locations, news categories, sports team scores, twitter favorites – Can update all tiles belonging to your application • No API Change for binding tiles – BindToShellTile now binds you to all tiles – Send Tile ID to service and use new attribute to direct update • Three new elements for back of tile properties Windows Phone
  • 19. Toast Notification • App icon and two text fields • Time critical and personally relevant • Users must opt-in via app UI Windows Phone
  • 20. Demo Demo 3: Push Notifications
  • 21. 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 Windows Phone
  • 22. 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 Windows Phone
  • 23. 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 Windows Phone
  • 24. Q&A
  • 25. 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. © 2011 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.