SlideShare una empresa de Scribd logo
1 de 18
Oliver Scheer
Senior Technical Evangelist
Microsoft Deutschland
http://the-oliver.com
Push Notifications
Push
Notifications
3/18/2014
Push Notifications and Live Tiles
• Push Notifications offer developers a way to send timely
information relating to their applications even when they
are not running
+
• 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
Server-initiated communication
Enable key background scenarios
Preserve battery life and user experience
Prevent polling for updates
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 the Tile is currently pinned to the Start screen, system updates it using notification message
content
5
Push Notification Data Flow
URI to the service:
"http://notify.live.com/throttledthirdparty/01.00/AAFRQHgiiMWNTYrRD
XAHQtz-AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA"
Push enabled
applications
Notifications
service
HTTP POST
the message
Push endpoint is established. URI is
created for the endpoint.
1
2
3
Third-party
service
MPNS:
Microsoft
hosted
server
Send PN
Message
4
Push Notification Features
• Tile updates can update any display element of each of the Tile templates
• Be careful to downgrade updates sent to 7.1 clients
• 30 subscription endpoints allowed per phone
• Maximum size of a notification is 1KB for the header and 3KB for the payload.
• Unauthenticated Web Service limited to 500 push notifications per subscription per day
• Authenticated Web Services are recommended
• Communication uses HTTPS channel
• No limit
• Able to register a callback request
Toast Message Content
•Used by system to display Toast message if app not running
•Navigates to page specified in <Param> (if supplied)
•If app is already running
• ShellToastNotificationReceived event fires
• <Text1> and <Text2> values in event args as Dictionary<string, string>
8
Toast Message Content
• Use the following HTTP headers:
• Where <batching interval> is 3 – Immediate delivery, 13 – delivered within 450 seconds, 23 –
delivered within 900 seconds
9
string toastMessage = "<?xml version="1.0" encoding="utf-8"?>" +
"<wp:Notification xmlns:wp="WPNotification">" +
"<wp:Toast>" +
"<wp:Text1>WEATHER ALERT</wp:Text1>" +
"<wp:Text2>Stormy</wp:Text2>" +
"<wp:Param>/page1.xaml?value1=1234<wp:Param>" +
"</wp:Toast>" +
"</wp:Notification>";
sendNotificationRequest.ContentType = "text/xml";
sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", "toast");
sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
Tile Message Content
10
• Tile messages are never delivered to the app
• There are specific schemas for the a Tile update message for each of the three
Tile Templates: Flip, Cycle and Iconic
• Only Tiles using Flip and Iconic templates can be updated with images at remote URLs
• Remote Images limited to 80KB and must download in 30 seconds or less
• V7.x clients cannot consume these new templates. Recommend you:
• In your app, capture the device unique ID, the push URI, the OS version and the app
version. Send this data to your Web service registration method
• Make sure you only send the new templates to compatible new OS versions/app versions!
• Use the following HTTP headers:
sendNotificationRequest.ContentType = "text/xml";
sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", “token");
sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
FlipTile Template Tile Message Schema
<?xml version="1.0"?>
<wp:Notification xmlns:wp="WPNotification" Version="2.0">
<wp:Tile Id="[TileId]" Template="FlipTile">
<wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage>
<wp:WideBackgroundImage Action="Clear">[front of wd tile img URI]</wp:WideBackgroundImage>
<wp:WideBackBackgroundImage Action="Clear">[back of wd tile img URI]</wp:WideBackBackgroundImage>
<wp:WideBackContent Action="Clear">[back of wd tile content text]</wp:WideBackContent>
<wp:BackgroundImage Action="Clear">[front of med tile img URI]</wp:BackgroundImage>
<wp:Count Action="Clear">[count]</wp:Count>
<wp:Title Action="Clear">[title text]</wp:Title>
<wp:BackBackgroundImage Action="Clear">[back of med tile img URI]</wp:BackBackgroundImage>
<wp:BackTitle Action="Clear">[back of tile title text]</wp:BackTitle>
<wp:BackContent Action="Clear">[back of med tile content text]</wp:BackContent>
</wp:Tile>
</wp:Notification>
3/18/201411
CycleTile Template Tile Message Schema
<?xml version="1.0"?>
<wp:Notification xmlns:wp="WPNotification" Version="2.0">
<wp:Tile Id="[TileId]" Template="CycleTile">
<wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage>
<wp:CycleImage1 Action="Clear">[photo 1 img URI]</wp:CycleImage1>
<wp:CycleImage2 Action="Clear">[photo 2 img URI]</wp:CycleImage2>
<wp:CycleImage3 Action="Clear">[photo 3 img URI]</wp:CycleImage3>
<wp:CycleImage4 Action="Clear">[photo 4 img URI]</wp:CycleImage4>
<wp:CycleImage5 Action="Clear">[photo 5 img URI]</wp:CycleImage5>
<wp:CycleImage6 Action="Clear">[photo 6 img URI]</wp:CycleImage6>
<wp:CycleImage7 Action="Clear">[photo 7 img URI]</wp:CycleImage7>
<wp:CycleImage8 Action="Clear">[photo 8 img URI]</wp:CycleImage8>
<wp:CycleImage9 Action="Clear">[photo 9 img URI]</wp:CycleImage9>
<wp:Count Action="Clear">[count]</wp:Count>
<wp:Title Action="Clear">[title text]</wp:Title>
</wp:Tile>
</wp:Notification>
3/18/201412
IconicTile Template Tile Message Schema
<?xml version="1.0"?>
<wp:Notification xmlns:wp="WPNotification" Version="2.0">
<wp:Tile Id="[TileId]" Template="IconicTile">
<wp:SmallIconImage Action="Clear">[sm icon img URI]</wp:SmallIconImage>
<wp:IconImage Action="Clear">[med/wd icon img URI]</wp:IconImage>
<wp:WideContent1 Action="Clear">[wd tile content line 1]</wp:WideContent1>
<wp:WideContent2 Action="Clear">[wd tile content line 2]</wp:WideContent2>
<wp:WideContent3 Action="Clear">[wd tile content line 3]</wp:WideContent3>
<wp:Count Action="Clear">[count]</wp:Count>
<wp:Title Action="Clear">[title text]</wp:Title>
<wp:BackgroundColor Action="Clear">[hex ARGB background color of tile]</wp:BackgroundColor>
</wp:Tile>
</wp:Notification>
3/18/201413
Raw Message Content
• Use the following HTTP headers:
• Where <batching interval> is 3 – Immediate delivery, 13 – delivered within 450 seconds, 23 –
delivered within 900 seconds
• Message Content is application-specific – only gets delivered to running app
• For example use XML to format data
14
string tileMessage = "<?xml version="1.0" encoding="utf-8"?>" +
"<root>" +
"<Value1>SomeUserValue<Value1>" +
"<Value2>SomeOtherUserValue<Value2>" +
"</root>";
sendNotificationRequest.ContentType = "text/xml";
sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
Demo:
Push Notifications
15
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
Review
• Push Notifications are an efficient and battery-friendly way of sending notifications from a
server to an app on a phone
• Raw notifications go only to a running app
• Toast notifications go to the app if it is running, otherwise display as a popup on the phone
• Tile notifications are used only to update tiles on the Start Screen
The information herein is for informational
purposes only an 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.
© 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.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION
IN THIS PRESENTATION.

Más contenido relacionado

La actualidad más candente

Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
clkao
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
webhostingguy
 
APACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUXAPACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUX
webhostingguy
 

La actualidad más candente (20)

Java networking programs socket based
Java networking programs socket basedJava networking programs socket based
Java networking programs socket based
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
 
CNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: ExploitationCNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: Exploitation
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Introduction to Apache Web Services using latex
 Introduction to Apache Web Services using latex Introduction to Apache Web Services using latex
Introduction to Apache Web Services using latex
 
Cgi
CgiCgi
Cgi
 
What is Node.js? (ICON UK)
What is Node.js? (ICON UK)What is Node.js? (ICON UK)
What is Node.js? (ICON UK)
 
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTPSmuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTP
 
ASP.NET WEB API
ASP.NET WEB APIASP.NET WEB API
ASP.NET WEB API
 
Nginx
NginxNginx
Nginx
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
 
Hack proof your ASP NET Applications
Hack proof your ASP NET ApplicationsHack proof your ASP NET Applications
Hack proof your ASP NET Applications
 
Apache web server
Apache web serverApache web server
Apache web server
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
 
APACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUXAPACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUX
 
Server-Side Programming Primer
Server-Side Programming PrimerServer-Side Programming Primer
Server-Side Programming Primer
 
IBM Connect 2016 - Break out of the Box
IBM Connect 2016 - Break out of the BoxIBM Connect 2016 - Break out of the Box
IBM Connect 2016 - Break out of the Box
 
Oracle virtual server-2-t0-3-upgrade
Oracle virtual server-2-t0-3-upgradeOracle virtual server-2-t0-3-upgrade
Oracle virtual server-2-t0-3-upgrade
 

Similar a Windows Phone 8 - 9 Push Notifications

HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014
Christian Wenz
 
HTML5 vs Silverlight
HTML5 vs SilverlightHTML5 vs Silverlight
HTML5 vs Silverlight
Matt Casto
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mohammad Shaker
 

Similar a Windows Phone 8 - 9 Push Notifications (20)

08.Push Notifications
08.Push Notifications 08.Push Notifications
08.Push Notifications
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
WP8.1 Tiles and Notifications
WP8.1 Tiles and NotificationsWP8.1 Tiles and Notifications
WP8.1 Tiles and Notifications
 
MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher
 
HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014
 
14 tiles, notifications, and action center
14   tiles, notifications, and action center14   tiles, notifications, and action center
14 tiles, notifications, and action center
 
Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)Hands-on with AWS IoT (November 2016)
Hands-on with AWS IoT (November 2016)
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time Communications
 
HTML5 vs Silverlight
HTML5 vs SilverlightHTML5 vs Silverlight
HTML5 vs Silverlight
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in Action
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
Middleware in Asp.Net Core
Middleware in Asp.Net CoreMiddleware in Asp.Net Core
Middleware in Asp.Net Core
 
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界
 
XST - Cross Site Tracing
XST - Cross Site TracingXST - Cross Site Tracing
XST - Cross Site Tracing
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Webservices
WebservicesWebservices
Webservices
 
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsysUsing communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 

Más de Oliver Scheer

Windows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone StoreWindows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone Store
Oliver Scheer
 
Windows Phone 8 - 16 Wallet and In-app Purchase
Windows Phone 8 - 16 Wallet and In-app PurchaseWindows Phone 8 - 16 Wallet and In-app Purchase
Windows Phone 8 - 16 Wallet and In-app Purchase
Oliver Scheer
 
Windows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and MapsWindows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and Maps
Oliver Scheer
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using Speech
Oliver Scheer
 
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and BluetoothWindows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Oliver Scheer
 
Windows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App CommunicationWindows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App Communication
Oliver Scheer
 
Windows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone ResourcesWindows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone Resources
Oliver Scheer
 
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
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
Oliver Scheer
 
Windows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application LifecycleWindows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application Lifecycle
Oliver Scheer
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
Oliver Scheer
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Oliver Scheer
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 Applications
Oliver Scheer
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
Oliver Scheer
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 Applications
Oliver Scheer
 

Más de Oliver Scheer (15)

Windows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone StoreWindows Phone 8 - 17 The Windows Phone Store
Windows Phone 8 - 17 The Windows Phone Store
 
Windows Phone 8 - 16 Wallet and In-app Purchase
Windows Phone 8 - 16 Wallet and In-app PurchaseWindows Phone 8 - 16 Wallet and In-app Purchase
Windows Phone 8 - 16 Wallet and In-app Purchase
 
Windows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and MapsWindows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and Maps
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using Speech
 
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and BluetoothWindows Phone 8 - 13 Near Field Communcations and Bluetooth
Windows Phone 8 - 13 Near Field Communcations and Bluetooth
 
Windows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App CommunicationWindows Phone 8 - 11 App to App Communication
Windows Phone 8 - 11 App to App Communication
 
Windows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone ResourcesWindows Phone 8 - 10 Using Phone Resources
Windows Phone 8 - 10 Using Phone Resources
 
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 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
 
Windows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application LifecycleWindows Phone 8 - 5 Application Lifecycle
Windows Phone 8 - 5 Application Lifecycle
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 Applications
 
Windows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and StorageWindows Phone 8 - 4 Files and Storage
Windows Phone 8 - 4 Files and Storage
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 Applications
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+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@
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Windows Phone 8 - 9 Push Notifications

  • 1. Oliver Scheer Senior Technical Evangelist Microsoft Deutschland http://the-oliver.com Push Notifications
  • 3. Push Notifications and Live Tiles • Push Notifications offer developers a way to send timely information relating to their applications even when they are not running + • Windows phone has the unique ability to provide the end user glanceable access to the information they care most about, via Live Tiles
  • 4. Push Notifications Server-initiated communication Enable key background scenarios Preserve battery life and user experience Prevent polling for updates
  • 5. 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 the Tile is currently pinned to the Start screen, system updates it using notification message content 5
  • 6. Push Notification Data Flow URI to the service: "http://notify.live.com/throttledthirdparty/01.00/AAFRQHgiiMWNTYrRD XAHQtz-AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA" Push enabled applications Notifications service HTTP POST the message Push endpoint is established. URI is created for the endpoint. 1 2 3 Third-party service MPNS: Microsoft hosted server Send PN Message 4
  • 7. Push Notification Features • Tile updates can update any display element of each of the Tile templates • Be careful to downgrade updates sent to 7.1 clients • 30 subscription endpoints allowed per phone • Maximum size of a notification is 1KB for the header and 3KB for the payload. • Unauthenticated Web Service limited to 500 push notifications per subscription per day • Authenticated Web Services are recommended • Communication uses HTTPS channel • No limit • Able to register a callback request
  • 8. Toast Message Content •Used by system to display Toast message if app not running •Navigates to page specified in <Param> (if supplied) •If app is already running • ShellToastNotificationReceived event fires • <Text1> and <Text2> values in event args as Dictionary<string, string> 8
  • 9. Toast Message Content • Use the following HTTP headers: • Where <batching interval> is 3 – Immediate delivery, 13 – delivered within 450 seconds, 23 – delivered within 900 seconds 9 string toastMessage = "<?xml version="1.0" encoding="utf-8"?>" + "<wp:Notification xmlns:wp="WPNotification">" + "<wp:Toast>" + "<wp:Text1>WEATHER ALERT</wp:Text1>" + "<wp:Text2>Stormy</wp:Text2>" + "<wp:Param>/page1.xaml?value1=1234<wp:Param>" + "</wp:Toast>" + "</wp:Notification>"; sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", "toast"); sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
  • 10. Tile Message Content 10 • Tile messages are never delivered to the app • There are specific schemas for the a Tile update message for each of the three Tile Templates: Flip, Cycle and Iconic • Only Tiles using Flip and Iconic templates can be updated with images at remote URLs • Remote Images limited to 80KB and must download in 30 seconds or less • V7.x clients cannot consume these new templates. Recommend you: • In your app, capture the device unique ID, the push URI, the OS version and the app version. Send this data to your Web service registration method • Make sure you only send the new templates to compatible new OS versions/app versions! • Use the following HTTP headers: sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", “token"); sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
  • 11. FlipTile Template Tile Message Schema <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="FlipTile"> <wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage> <wp:WideBackgroundImage Action="Clear">[front of wd tile img URI]</wp:WideBackgroundImage> <wp:WideBackBackgroundImage Action="Clear">[back of wd tile img URI]</wp:WideBackBackgroundImage> <wp:WideBackContent Action="Clear">[back of wd tile content text]</wp:WideBackContent> <wp:BackgroundImage Action="Clear">[front of med tile img URI]</wp:BackgroundImage> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> <wp:BackBackgroundImage Action="Clear">[back of med tile img URI]</wp:BackBackgroundImage> <wp:BackTitle Action="Clear">[back of tile title text]</wp:BackTitle> <wp:BackContent Action="Clear">[back of med tile content text]</wp:BackContent> </wp:Tile> </wp:Notification> 3/18/201411
  • 12. CycleTile Template Tile Message Schema <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="CycleTile"> <wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage> <wp:CycleImage1 Action="Clear">[photo 1 img URI]</wp:CycleImage1> <wp:CycleImage2 Action="Clear">[photo 2 img URI]</wp:CycleImage2> <wp:CycleImage3 Action="Clear">[photo 3 img URI]</wp:CycleImage3> <wp:CycleImage4 Action="Clear">[photo 4 img URI]</wp:CycleImage4> <wp:CycleImage5 Action="Clear">[photo 5 img URI]</wp:CycleImage5> <wp:CycleImage6 Action="Clear">[photo 6 img URI]</wp:CycleImage6> <wp:CycleImage7 Action="Clear">[photo 7 img URI]</wp:CycleImage7> <wp:CycleImage8 Action="Clear">[photo 8 img URI]</wp:CycleImage8> <wp:CycleImage9 Action="Clear">[photo 9 img URI]</wp:CycleImage9> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> </wp:Tile> </wp:Notification> 3/18/201412
  • 13. IconicTile Template Tile Message Schema <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="IconicTile"> <wp:SmallIconImage Action="Clear">[sm icon img URI]</wp:SmallIconImage> <wp:IconImage Action="Clear">[med/wd icon img URI]</wp:IconImage> <wp:WideContent1 Action="Clear">[wd tile content line 1]</wp:WideContent1> <wp:WideContent2 Action="Clear">[wd tile content line 2]</wp:WideContent2> <wp:WideContent3 Action="Clear">[wd tile content line 3]</wp:WideContent3> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> <wp:BackgroundColor Action="Clear">[hex ARGB background color of tile]</wp:BackgroundColor> </wp:Tile> </wp:Notification> 3/18/201413
  • 14. Raw Message Content • Use the following HTTP headers: • Where <batching interval> is 3 – Immediate delivery, 13 – delivered within 450 seconds, 23 – delivered within 900 seconds • Message Content is application-specific – only gets delivered to running app • For example use XML to format data 14 string tileMessage = "<?xml version="1.0" encoding="utf-8"?>" + "<root>" + "<Value1>SomeUserValue<Value1>" + "<Value2>SomeOtherUserValue<Value2>" + "</root>"; sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>");
  • 16. 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
  • 17. Review • Push Notifications are an efficient and battery-friendly way of sending notifications from a server to an app on a phone • Raw notifications go only to a running app • Toast notifications go to the app if it is running, otherwise display as a popup on the phone • Tile notifications are used only to update tiles on the Start Screen
  • 18. The information herein is for informational purposes only an 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. © 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. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Notas del editor

  1. Push Notifications and Live TilesA user can choose to pin a tile to the Start Screen for any application, for contacts, groups of contacts, and for web pages. Apps can create secondary tiles.These tiles consist of text elements, an optional count and images, and these elements are ‘live’ and can be updated. In the Tiles and Lock Screen Notifications module, you learnt how to update the tiles :From apps, using the ShellTiles APIFrom background agents using the ShellTiles APIFrom ShellTileScheduleThe fourth way that tiles can be updated is from logic running on a backend server, which updates tiles by using the services of Microsoft Push Notifications Services (MPNS).
  2. Push NotificationsPush Notifications allows asynchronous messages to be sent to a phone. In the past, because of the nature of mobile phone networks, mobile software would usually poll a backend server to see if there was anything that had changed it was interested in. Unless you implemented costly wireless middleware, it was impossible to open a network connection to a mobile device to send it a message asynchronously – the software on the device had always to initiate the connection, to ‘call home’. Polling like this is very battery inefficient. Push Notifications is implemented to provide a mechanism to allow data to be sent to the device in a battery-efficient manner and in such a way that the user experience on the phone is not negatively affected. It works similar to email: long-lived HTTP requests are posted to the MPNS servers and the server only sends a response when it has some messages to deliver, but otherwise the request just sits there for a long time, until either it times out or a message is delivered. This is a very battery-efficient way of implementing this kind of messaging capability.
  3. Three Kinds of NotificationsThere are three types of push notifications that a web service can use when sending information to an application: toast, Tile, and raw notifications.Raw NotificationsYou can use a raw notification to send information to your application. If your application is not currently running, the raw notification is discarded on the Microsoft Push Notification Service and is not delivered to the device.Toast NotificationsA toast notification is displayed at the top of the screen to notify users of an event, such as a news or weather alert. The toast displays for about 10 seconds unless the user dismisses it with a flick to the right. If the user taps the toast, the application that sent the toast notification is launched.Tile NotificationsA Tile notification can be used to update a Tile on Start.
  4. Push Notification Data FlowThe diagram illustrates how Push works:Your client application running on the phone requests a push notification URI from the Push Notifications client service. The Push client service then negotiates with the Microsoft Push Notification Service (MPNS) and returns a notification URI to your client application Your client application can then send the URI to your cloud service. You must implement a web method on your service to allow client applications to register with your service, and you will have to implement some kind of list of registrations.When your web service has information to send to your client application, it uses the URI in sending a push notification to the Microsoft Push Notification Service.MPNS in turn routes the push notification to the application running on a Windows Phone device. Depending on the format of the push notification and the payload attached to it, the information is delivered as raw data to the application, the application&apos;s Tile is visually updated, or a toast notification is displayed. The Microsoft Push Notification Service sends a response code to your web service after a push notification is sent indicating that the notification has been received and will be delivered to the device at the next possible opportunity. However, the Microsoft Push Notification Service does not provide an end-to-end confirmation that your push notification was delivered from your web service to the device.
  5. Push Notification FeaturesEach phone can support up to 30 apps that have been run and requested a Push notifications subscription endpoint.From the server-side, you can have your web service run as unauthenticated, which means that it is limited to 500 push notifications per subscription – that means 500 to your app on each phone – not so much of a limit!However, if your web service is authenticated (which is recommended), there is no limit on the number of notifications, you communicate with MPNS over an HTTPS encrypted channel and you can set up a callback registration request that associates a callback URI and message with a subscription. After a callback is registered, if the device transitions into an inactive state, the Microsoft Push Notification Service will send the message to the callback URI. After the device returns to an active state, the web service should re-register the callback.
  6. Toast Message ContentThe payload for a Toast Notification must conform to a specific XML schema. This is because a toast notification is handled by the Push Notification Client Services layer if the app is not running – in this case it pops up a toast notification on the screen.If the app is running, and your code has subscribed to the appropriate event, the content of the toast message is delivered to the app.
  7. This is an example of a toast notification. You must also specify the headers as shown.
  8. Tile Message ContentThe payload for a Tile Update is never delivered to the app, and must again conform to a specific XML schema. The data in this message is handled by the Push Notifications Client Services layer on the phone and used to update tiles.Specify the headers on this notification as shown.
  9. Each of the new tile templates on Windows Phone 8 has it’s own specific XML schema for the messages.This one shows the FlipTile notification. Notice that you can clear any property on the tile by specifying the Action=&quot;Clear“ attribute.
  10. The CycleTile message can specify from one to nine images.Note, unlike with FlipTile or IconicTile, these images cannot be at remote (web) URLs. They must specify an image in the app package (using an ms-appx:/// URI) or an image in the local folder, using an ms-appdata:///local/shared/shellcontent URI).
  11. Finally, the IconicTile template schema
  12. Raw Message ContentThis is an example of the payload you can send for a RAW message. Since a RAW message is delivered only to your app, and only if it is the running application, the format of the payload is entirely application-specific, so can be anything you want.This example formats some data as XML.
  13. For demonstration notes please look in the “Demonstration” folder and open the corresponding Word document.
  14. Response Custom HeadersAfter your web service sends a push notification to the Microsoft Push Notification Service, your web service will receive one of many response codes with possible custom headers. The information you get back is rich and fairly complicated. The values you get may indicate that:The message has been queued OK and will be sent when possibleThe URI you passed is for an expired subscriptionThe target device may be ‘temporarily disconnected’You have exceeded the quota and must not send any more notifications for a certain period of timeYou should study the response codes as described in the documentation at the URI given on the slide so that you can implement the correct logic in your web service.
  15. ReviewPush Notifications are an efficient and battery-friendly way of sending notifications from a server to an app on a phoneRaw notifications go only to a running appToast notifications go to the app if it is running, otherwise display as a popup on the phone Tile notifications are used only to update tiles on the Start Screen