6. • Client app contacts Platform Notification Service,
to retrieve current channel (for example:
ChannelURIs, device tokens, registrationIds)
• App updates handle in back-end
Registration at
app launch
• App back-end send notification to PNS
• PNS pushes the notification to the app on the
device
Sending
Notification
• Delete expired handles when PNS rejects themMaintenance
Platform
Notification
Service
App back-end
7. For enterprise apps
Keep users up to date
Not only for alerts
‘push to sync’ notifications
For consumer apps
Richer than SMS
Considerably cheaper
8. • Different communication protocols to PNS
• Different presentation formats and capabilities
Platform dependency
• Provide a way to send a message to a device/channel
• Target user or group of interest
• Back-end has to maintain an identification repository
Routing
• Need to store current handles for each device
• Broadcast to millions of devices with low latency
Scale
9.
10. Message
Distribution
Push notification to millions of
devices across supported
platforms with single call
Collect information from devices
(e.g. location)
Message Templating
Convert message in to appropriate
format
• XML or JSON
Use for localization
Templates can be used to present
certain information according to user
preferences
Device Registration
Maintains a registry of devices
and users/groups
Message Targeting
Targets specific users and
groups based on tags
Allows you to target messages
to specific users
11. Bing (news, finance, sports, …) Past event sample – Sochi 2014
Preinstalled on
Windows Millions of devices
Millions of
notifications/day Minutes to delivery
Interest groups
(countries,
disciplines, athletes)
Localized
notifications
Million devices
(iOS, Android, WP) Million notifications
10s
3+ <2
100s
3+ 150+
12. Send Notification
App back-end sends a message to
Notification Hub
Notification Hub pushes it to PNS’
Register
Client app retrieves its current handle
(PNS)
Client app registers on Notification Hub
(current handle)
One-time set up
Create a Notification Hub
APNsWNS
Notification Hub
App back-end
iOS app Windows app
MPNS
GCM
ADM
13. X-plat: from
any back-end
to any mobile
platform
No need to
store device
information in
the app back-
end
Routing and
interest groups
Personalization
and
localization
Broadcast at
scale, multicast,
unicast
Telemetry
14. Windows 10 to Send/Receive Notifications
Step 1
• Register a new app in the Windows Dev Store and enable Push notification for this app (retrieve MPNS SSID &
secret)
Step 2
• Create your app in Visual studio and associate it with the store
Step 3
• Create an Azure Notification hub service and enter your MPNS SSID & secret
Step 4
• In Visual Studio, add WindowsAzure.Messaging.Managed nuget package. Develop your app.
19. Example : Payload for windows 10
• Adaptive and interactive toast notification
• New Features like
o Actions
o Input (Text, Dropdown)
o Sounds
20. Example : Payload for windows 10
<toast launch="1">
<visual>
<binding template="ToastGeneric">
<image id="1" src="AssetsSquare30x30Logo.png" alt=""/>
<text id="1">Dear Bill Gates Get 40% if you come visit us today ! Best Regards from our
team.</text>
</binding></visual>
<actions>
<action activationType="foreground" content="Yes I will !" arguments="details"/>
<action activationType="background" content="No thanks." arguments="later"/>
</actions>
</toast>
21. Tags as interest groups
• Client app can register with a set of tags
• Tags are simple strings (no pre-provisioning is
required)
• App back-end can target all clients with the same
tag
You can use tags also for:
• Multiple type of interest groups, for example:
• Follow bands: tag “followband:Beatles”
• Follow users: tag “followuser:Alice”
• Tag devices with a user ID
• Tags can be user preferences or system information
Notification Hub
App back-end
Tag:”Beatles”Tag:”Wailers”
Tag:”Beatles
”
23. Send
• “All my group except me”
group:id && !user:idSocial
• Touchdown event is send to everybody following either team
Followteam:A || Followteam:B || followplayer:1 || followplayer:2
…
Events
• Send notifications at specific times. E.g. Tag with timezone, @12pm in Seattle
send:
timezone:PST && follows:thaifood
Hours
• Send a reminder to update to your first Android app version:
version:1.0 && platform:AndroidVersions & platforms
24. Templates for multi-platform push
Registration
• Client apps can register with a platform specific
template, for example:
• Windows tablet registers with Windows Store
ToastText01 template
• iPhone with the Apple JSON template: { aps: { alert:
“$(message)” } }
Send notification
• App back-end sends a platform independent
message: {message: “Hello!”}
Notes
• Multiple templates can be specified for each device
• Each template can have a different set of tags
Notification Hub
App back-end
<toast>
<visual>
<binding template="ToastText01">
<text id="1">$(message)</text>
</binding>
</visual>
</toast>
{
aps: {
alert: “$(message)”
}
}
{
message: “Hello!”
}
Hello!
Hello!
25. Templates for localization
Registration
• Client apps can register with personalized templates,
for example:
• Windows tablet wants to receive news in English
• iPhone wants Italian
Send notification
• App back-end sends a message including both
languages: {news_en: “Hello!”, news_it: “Ciao!”}
Template Expressions
• Templates support a simple expression language:
• For example: {‘Elio, ’+$(friend)+’ added you to
’+$(groupName)}
Notification Hub
App back-end
<toast>
<visual>
<binding template="ToastText01">
<text id="1">$(news_en)</text>
</binding>
</visual>
</toast>
{
aps: {
alert: “$(news_it)”
}
}
{
news_en: “Hello!”,
news_it: “Ciao!”
}
Hello!
Ciao!