Presentation is loading. Please wait.

Presentation is loading. Please wait.

07 | Live tiles & notifications

Similar presentations


Presentation on theme: "07 | Live tiles & notifications"— Presentation transcript:

1 07 | Live tiles & notifications
11/7/2017 07 | Live tiles & notifications © 2012 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.

2 Course Topics Building Windows Store Apps for iOS Developers Jump Start 01 | Introduction to the Windows Store Platform and the tools 02 | C# for Objective-C developers 03 | Async programming & Networking intro Meal Break, around noon PST 45 to 60 mins 04 | Introduction to XAML & UI Patterns for XAML apps 05 | App Model & Storage 06 | Contracts 07 | Live Tiles & Notifications 08 | Windows Store APIs

3 In this session… Introduction to tiles Notifications on Windows
11/7/2017 In this session… Introduction to tiles Alive with Activity Secondary tiles Notifications on Windows Windows Azure Mobile Services Lock screen integration © 2012 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.

4 Live tiles & Notifications
11/7/2017 Live tiles & Notifications Windows Notifications is similar to Apple’s iOS model Badges Local notifications Push notifications Extras on Windows 8 and Phone: Live tiles A tile is your business card & first impression, a differentiator © 2012 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.

5 Live tiles, notifications, toast..
11/7/2017 demo Live tiles, notifications, toast.. © 2012 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.

6 Tile templates (not all inclusive)

7 Tiles Four sizes in Windows 8.1 Two sizes in 8.0
11/7/2017 Tiles Four sizes in Windows 8.1 Two sizes in 8.0 Template driven Tiles: Can have a badge Badges: User is in control of tile size Updates: local, poll periodically, or push © 2012 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.

8 11/7/2017 Tile update schema Set version to “2” to enable Windows 8.1 Preview templates <?xml version="1.0" encoding="utf-8" ?> <tile> <visual version? = "integer" lang? = "string" baseUri? = "anyURI" branding? = "string" addImageQuery? = "boolean" > <!-- One or more binding elements: *always place large tiles last* --> <binding template = "TileSquare150x150Image" | "TileSquare150x150Block" | ... fallback? = "TileSquareImage" | "TileSquareBlock" | ... contentId = "string" lang? = "string" baseUri? = "anyURI" <!-- Some combination of image and text. id's used to de-dupe updates --> <image id = "integer" src = "string" alt? = "string" addImageQuery? = "boolean" /> <text id = "integer" lang? = "string" /> </binding> </visual> </tile> Best practice: use updates that include all tile sizes © 2012 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.

9 Updating a tile locally
11/7/2017 Updating a tile locally *Using the NotificationExtensions sample API library* ITileSquare310x310Image tileContent = TileContentFactory.CreateTileSquare310x310Image(); tileContent.Image.Src = “ tileContent.Image.Alt = "Web Image"; // create the notification for a wide310x150 template. ITileWide310x150ImageAndText01 wide310x150Content = TileContentFactory.CreateTileWide310x150ImageAndText01(); wide310x150Content.TextCaptionWrap.Text = "This tile notification uses web images."; wide310x150Content.Image.Src = ImageUrl.Text; // create the square150x150 template and attach it to the wide310x150 template. ITileSquare150x150Image square150x150Content = TileContentFactory.CreateTileSquare150x150Image(); square150x150Content.Image.Src = “ // add the other tiles wide310x150Content.Square150x150Content = square150x150Content; tileContent.Wide310x150Content = wide310x150Content; // send the notification to the app's application tile. TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification()); © 2012 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.

10 Polling for tile updates
11/7/2017 Polling for tile updates PeriodicUpdateRecurrence recurrence = PeriodicUpdateRecurrence.HalfHour; List<Uri>uris = new List<Uri>() { new Uri (" new Uri (" }; TileUpdateManager.CreateTileUpdaterForApplication().StartPeriodicUpdateBatch(urisToPoll, recurrence); © 2012 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.

11 Secondary tiles Increases your start screen presence
11/7/2017 Secondary tiles Increases your start screen presence Launch leads to relevant content Support roaming User is in control to pin or remove © 2012 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.

12 11/7/2017 Secondary tiles Uri square150x150Logo = new Uri("ms-appx:///Assets/square150x150Tile-sdk.png"); string tileActivationArguments = “Redmond” ; // Create a medium size Secondary tile SecondaryTile secondaryTile = new SecondaryTile(MainPage.logoSecondaryTileId, “Redmond, WA ", tileActivationArguments,square150x150Logo,TileSize.Square150x150); // To have the larger tile sizes available the assets must be provided. secondaryTile.VisualElements.Wide310x150Logo = wide310x150Logo; // The 70x70 asset does not have to be supplied as it will be created by downsizing the 150x150. secondaryTile.VisualElements.Square70x70Logo = square70x70Logo; // The display of the app name can be controlled for each tile size. The default is false. secondaryTile.VisualElements.ShowNameOnWide310x150Logo = true; secondaryTile.RoamingEnabled = false; // OK, the tile is created and we can now attempt to pin the tile. // Note that the status message is updated when the async operation to pin the tile completes. bool isPinned = await secondaryTile.RequestCreateForSelectionAsync( MainPage.GetElementRect((FrameworkElement)sender), Windows.UI.Popups.Placement.Below); © 2012 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.

13 Toast Notify user to take an important action
11/7/2017 Toast Notify user to take an important action Presented in-app, pushed, or scheduled Can be long running, play sounds, scheduled © 2012 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.

14 XML toast notification schema
<?xml version="1.0" encoding="utf-8" ?> <toast launch? = "string" duration? = "long" | "short" > <visual version? = "integer" lang? = "string" baseUri? = "anyURI" branding? = "string" addImageQuery? = "boolean" > <binding template = "ToastImageAndText01" | "ToastImageAndText02" | ...="" fallback? = "string" lang? = "string" baseUri? = "anyURI" branding? = "string" addImageQuery? = "boolean" > <!-- Some number of child elements --> <image id = "integer" src = "string" alt = "string" addImageQuery? = "boolean" /> <text id = "integer" lang? = "string" /> </binding> </visual> <!-- Optional audio --> <audio src? = "ms-winsoundevent:Notification.Default" |... loop? = "boolean" silent? = "boolean" /> </toast>

15 Push notifications Everything we just learned but sent from a server
11/7/2017 Push notifications Everything we just learned but sent from a server Tiles update even when your app is not running Based on Windows Notification Services, a free service for your apps to use © 2012 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.

16 Push Notification Overview
11/7/2017 Push Notification Overview Windows 8 Cloud Service Request Channel URI Register with your Cloud Service Authenticate & Push Notification Windows Store App 2 1 3 Notification Client Platform Windows Notification Service 3 © 2012 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.

17 You do have to register your app
11/7/2017 You do have to register your app © 2012 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.

18 Push notifications server-side
11/7/2017 Push notifications server-side Azure Notification Services Free cloud service for notifications Template based solutions 3rd party partners & OSS libraries Urban airship Push.io Parse Agora games PushSharp library on github © 2012 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.

19 Capability summary for notifications
11/7/2017 Capability summary for notifications Notification type Cycling Scheduled Expiring Recurring Audio Periodic Push Tile Badge Toast Raw © 2012 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.

20 Windows.UI.Notifications cheat sheet
11/7/2017 Windows.UI.Notifications cheat sheet TileUpdateManager, TileUpdater, TileNotification BadgeUpdateManager, BadgeUpdater, BadgeNotification, ToastNotificationManager, ToastNotifier, ToastNotification, © 2012 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.

21 Lock screen apps Up to 7 apps can run with lock screen permissions
11/7/2017 Lock screen apps Up to 7 apps can run with lock screen permissions One app can update detailed status Runs up to every 15 mins in background Can keep a socket open Updates badge & tiles on lock screen © 2012 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.

22 When Should I Update my Tile or Toast?
Personalized, real-time status Push 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

23 How Should I Not Update My Tile?
11/7/2017 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 expiration on 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. © 2012 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.

24 References Tile schema Toast schema Azure mobile services
11/7/2017 References Tile schema Toast schema Azure mobile services Live Connect Dev Center (to register for push) © 2012 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.

25 References (2) A great intro video to tiles & notifications
11/7/2017 References (2) A great intro video to tiles & notifications © 2012 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.


Download ppt "07 | Live tiles & notifications"

Similar presentations


Ads by Google