Conveying warnings with the Windows Push Notification Service and Windows Azure .


37 views
Uploaded on:
Description
Motivation. Audit of Live Tiles.A more profound take a gander at utilizing the Windows Push Notification Service.Introduction to the Windows Azure Toolkit for Windows 8.You\'ll leave with illustrations of how toEnable push warnings for your service.Build a push empowered administration utilizing Windows Azure.. Live Tiles on Start.
Transcripts
Slide 1

SAC-863T Delivering notices with the Windows Push Notification Service and Windows Azure Darren Louie, Nick Harris Program Manager, Technical Evangelist Microsoft Corporation

Slide 2

Agenda Review of Live Tiles. A more profound take a gander at utilizing the Windows Push Notification Service. Prologue to the Windows Azure Toolkit for Windows 8. You\'ll leave with cases of how to Enable push warnings for your administration. Assemble a push empowered administration utilizing Windows Azure.

Slide 3

demo Live Tiles on Start

Slide 4

Live Tiles with Push Notifications

Slide 6

Windows Push Notification Service (WNS)

Slide 7

Push Notification Overview Windows 8 Cloud Service Metro Style App Request Channel URI Register with your Cloud Service Authenticate & Push Notification 2 3 1 Notification Client Platform Windows Push Notification Service 3

Slide 8

1. Ask for a Channel URI Windows 8 Each tile has an interesting Channel URI. Asked for by App on every run . URI can change . Created by WNS Opaque to the application. Cloud Service Metro Style App 2 3 1 Notification Client Platform Windows Push Notification Service 3

Slide 9

1. Ask for Channel URI var push = Windows.Networking.PushNotifications ; var guarantee = push.PushNotificationChannelManager . createPushNotificationChannelForApplicationAsync (); https://db3.notify.windows.com/?token=AQI8iP%2OtQE%3d promise.then ( work ( ch ) { var uri = ch.uri ; var expiry = ch.expirationTime ; updateChannelUri ( uri , expiry); });

Slide 10

2. Enlist with your Cloud Service Windows 8 Windows 8 Register your application with your own Cloud Service. Ought to be verified and secure. Store Channel URI and partner it with any application particular setting. Make your business rationale for sending warnings. Cloud Service Cloud Service Metro App Metro Style App 2 1 Notification Client Platform Notification Client Platform Windows Push Notification Service Windows Push Notification Service

Slide 11

2. Enroll with your Cloud Service work updateChannelUri (channel, channelExpiration ) { if (channel) { var serverUrl = "https://mysampleapp.cloudapp.net/register" ; var payload = { Expiry : channelExpiration.toString (), URI : channel }; var xhr = new WinJS.xhr ({ type : "POST " , url : serverUrl , headers : { "Content-Type" : "application/json ; charset=utf-8" }, information : JSON.stringify (payload) }).then( work ( req ) { … }); }

Slide 12

3. Verify & Send Notification Windows 8 Cloud Service Metro Style App OAuth 2 Authentication. HTTP POST to Channel URI. XML notice payload. 2 3 Notification Client Platform Windows Push Notification Service 3

Slide 13

3. Enlist your App

Slide 14

3. Confirmation HTTP Request POST https://login.live.com/accesstoken.srf HTTP/1.1 Content-Type: application/x-www-frame urlencoded Host: login.live.com Content-Length: 221 grant_type=client_credentials&client_id= ms-app%3A%2F%2FS-1-15-2-1633617344-1232597856-4562071667-7893084900-2692585271-282905334-531217761 &client_secret= XEvTg3USjIpvdWLBFcv44sJHRKcid43QXWfNx3YiJ4g &scope=notify.windows.com

Slide 15

3. Validation HTTP Response HTTP/1.1 200 OK Cache-Control: no-store Content-Length: 422 Content-Type: application/json Connection: close { "access_token":" EgAcAQMAAAAg/RBw ++jdA1MzM0LTUzMTIxNzc2MQA= ", " token_type":"bearer " }

Slide 16

3. Push Notification HTTP Request POST https://db3.notify.windows.com/? token=AQI8iP%2OtQE%3d HTTP/1.1 Content-Type: content/xml Host : db3.notify.windows.com X-WNS-Type: wns/identification Authorization: Bearer EgAcAQMAAAAg/RBw ++jdA1MzM0LTUzMTIxNzc2MQA = Content-Length : 58 <? xml version="1.0" encoding="utf-8"?> <badge value="34 "/>

Slide 17

3. Push Notification HTTP Response Important Notes Device can be disconnected or separated. Achievement shows that the demand was effectively gotten by WNS; not really that the client saw it. Extra headers in the reaction for notice and gadget status. HTTP/1.1 200 OK Content-Length: 0 X-WNS-NOTIFICATIONSTATUS: got X-WNS-MSG-ID: 1ACD59E4683FE4BF X-WNS-DEBUG-TRACE: DB3WNS4011434

Slide 18

anno u n c i ng Windows Push Notification Recipe

Slide 19

Authentication Code utilizing Windows.Recipes.Push.Notifications.Security ; …/Constructor takes your Package SID and mystery key IAccessTokenProvider _ tokenProvider = new WNSAccessTokenProvider ( " ms-app%3A%2F%2FS-1-15-2-1633617344-1232597856-4562071667-7893084900-2692585271-282905334-531217761" , " XEvTg3USjIpvdWLBFcv44sJHRKcid43QXWfNx3YiJ4g " );

Slide 20

Push Notification Code utilizing Windows.Recipes.Push.Notifications ; … var toast = new ToastNotification ( _ tokenProvider ); toast.ChannelUrl = " https ://db3.notify.windows.com/? token=AQI8iP%2OtQE%3d " ; toast.ToastType = ToastType .ToastImageAndText02; toast.Image = "https ://demosa.blob.core.windows.net/toastImg1.png" ; toast.Text = new List < string > { "Miguel Saenz remark on your status" , "I cherish that quote! How have you … " }; NotificationSendResult result = toast.Send ();

Slide 21

Push Notification Overview Building a Cloud Service with Window Azure Windows 8 Cloud Service What an administration needs to bolster How would I do that with Windows Azure? Metro Style App Windows Azure Compute Web Role Full IIS bolster WCF REST and ASP.NET MVC Windows Azure Storage Table Storage Blob Storage Secure, electronic API for channel URI enrollment. Tenacious capacity of channel URI. Capacity for tile and toast pictures. Ask for Channel URI Register with your Cloud Service Authenticate & Push Notification 2 3 1 Notification Client Platform Windows Push Notification Service 3

Slide 22

a nnouncing Windows Azure Toolkit for Windows 8

Slide 23

Windows Azure gives the assets to scale your administrations as your application develops.

Slide 24

Windows Azure Services Core Services: Windows Azure Compute Windows Azure Storage Table Storage Blob Storage Services to Help Scale: Windows Azure Elastic Scale Windows Azure CDN Windows Azure Traffic Manager Windows Azure App Fabric Cache

Slide 25

Recap

Slide 26

Session Recap There are 3 simple strides to execute push warnings: Request Channel URI Register with your Cloud Service Authenticate & Push The Windows Push Notification Recipe helps you effectively add push notices to your administration. The Windows Azure Toolkit for Windows 8 is the most ideal approach to begin assembling an administration. Windows Azure gives the assets to scale your administrations as your application develops.

Slide 27

Resources Register your application http://manage.dev.live.com/construct Download the Windows Azure Toolkit for Windows 8 http ://WATWindows8.codeplex.com Windows 8 Developer Documentation http://dev.windows.com

Slide 28

Sessions [APP-396T] Using tiles and warnings [SAC-850T] Getting started with Windows Azure [SAC-858T] Identity and get to administration for Windows Azure applications [SAC-868T] Building gadget & cloud applications [SAC-869T] Building worldwide and very accessible administrations utilizing Windows Azure [SAC-870T] Building adaptable web applications with Windows Azure [SAC-871T] Building social recreations for Windows 8 with Windows Azure [SAC-961T] Inside Windows Azure stockpiling: what\'s new and in the engine profound jump

Slide 29

t hank you Feedback and q uestions http ://forums.dev.windows.com Session f eedback http ://bldw.in/SessionFeedback

Slide 30

© 2011 Microsoft Corporation. All rights held. Microsoft, Windows, Windows Vista and other item names are or might be enrolled trademarks and additionally trademarks in the U.S. as well as different nations. The data thus is for educational purposes just and speaks to the present perspective of Microsoft Corporation as of the date of this presentation. Since Microsoft must react to changing economic situations, it ought not be deciphered to be a pledge with respect to Microsoft, and Microsoft can\'t ensure the exactness of any data gave after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Recommended
View more...