SlideShare a Scribd company logo
1 of 26
Azure
Notification Hub
Luca Di Fino
dev.luke2375@live.it
@luke2375
luke2375.wordpress.com
MICROSOFT MOBILE CAMP
ROMA, 12 Febbraio 2015
Agenda
• Overview
• Azure Notification Hub
• Let’s start
• Hub
• App
• Push
• Something more
• More notifications
• More channels
• More apps
• Q&A
MOBILE CAMP
ROMA, 12 Febbraio 2015
• Push Notifications offer developers a way
to send timely information relating to
their applications even when they are not
running
• Push notifications are delivered through
platform-specific infrastructures called
Platform Notification Systems (PNS)
+Windows has the unique ability to
provide the end user glanceable access
to the information they care most about,
via Live Tiles
MOBILE CAMP
ROMA, 12 Febbraio 2015
3
Back-end
PNS
Device
1
2
3
4
Retrieve PNS Handle
Store PNS Handle
Send Notification
Send to Device
• Users management
• Platform dependency
• Scale
• Refresh handles
• Multicast
• Routing
• Monitor and
telemetry
MOBILE CAMP
ROMA, 12 Febbraio 2015
4
MOBILE CAMP
ROMA, 12 Febbraio 2015
5
Azure
Notification Hub
MOBILE CAMP
ROMA, 12 Febbraio 2015
6
• Device token management
• Multiple platforms
• Scale
• Works with any backend
• .NET, Node.JS, REST API, PHP, Java, etc.
• Efficient tag-based multicast and pub/sub routing
• Personalization
• Rich telemetry
MOBILE CAMP
ROMA, 12 Febbraio 2015
MOBILE CAMP
ROMA, 12 Febbraio 2015
8
Demo
MOBILE CAMP
ROMA, 12 Febbraio 2015
9
+
1. Create the notification hub – Azure
2. Get app SID and Secret – Dev Center (Windows or Windows Phone)
3. Configure hub
4. Create client app – Visual Studio
5. Create app backend
MOBILE CAMP
ROMA, 12 Febbraio 2015
MOBILE CAMP
ROMA, 12 Febbraio 2015
11
MOBILE CAMP
ROMA, 12 Febbraio 2015
12
1
2
MOBILE CAMP
ROMA, 12 Febbraio 2015
13
1
2
MOBILE CAMP
ROMA, 12 Febbraio 2015
14
SID
Secret
MOBILE CAMP
ROMA, 12 Febbraio 2015
15
MOBILE CAMP
ROMA, 12 Febbraio 2015
16
string notificationHubPath = NOME_HUB;
string connectionString = DefaultListenSharedAccessSignature;
hub = new NotificationHub(notificationHubPath, connectionString);
var channel = await
PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
await hub.RegisterNativeAsync(channel.Uri);
• Add Nuget package WindowsAzure.Messaging.Managed
• Set Toast capable in .appxmanifest
• Create and register Notification
Channel in app.xaml.cs
• Add Nuget package WindowsAzure.ServiceBus
• Create the hub
• Send native notifications
MOBILE CAMP
ROMA, 12 Febbraio 2015
17
private NotificationHubClient hub;
hub = NotificationHubClient.CreateClientFromConnectionString(endpoint, hubname);
await hub.SendWindowsNativeNotificationAsync(XMLpayload); //WinRT
await hub.SendMpnsNativeNotificationAsync(XMLpayolad); //Silverlight
await hub.SendAppleNativeNotificationAsync(JSONpayload); //iOS
await hub.SendGcmNativeNotificationAsync(JSONpayload); //Android
MOBILE CAMP
ROMA, 12 Febbraio 2015
18
ToastText01 ToastImageAndText01
MOBILE CAMP
ROMA, 12 Febbraio 2015
19
TileSquareImage/TileSquare150x150Image TileSquarePeekImageAndText02
• What if we want more granular control over notifications?
• If we want to push notifications only to people who are subscribed to
a specific category, we use tags.
App
Backend
Combine tags with AND (&&), OR (||), NOT (!) and parentheses.
Tag expressions are limited to 20 tags if they contain only ORs; otherwise they are limited to 6 tags
MOBILE CAMP
ROMA, 12 Febbraio 2015
20
string[] tagsToSubscribeTo = { "phone", "news" };
await hub.RegisterNativeAsync(channel.Uri, tagsToSubscribeTo);
await hub.SendWindowsNativeNotificationAsync(toast, "phone");
await hub.SendWindowsNativeNotificationAsync(toast, "phone && news");
await hub.SendWindowsNativeNotificationAsync(toast, "phone || news");
• When in Standard tier, Notification Hubs supports a feature that
enables you to schedule notifications up to 7 days in the future
• To cancel a scheduled notification
There are no limits on the number of scheduled notifications you can send
MOBILE CAMP
ROMA, 12 Febbraio 2015
21
Notification notification = new AppleNotification("{"aps":{"alert":"Happy birthday!"}}");
var scheduled = await hub.ScheduleNotificationAsync(notification, new DateTime(2014, 7, 19, 0, 0, 0));
await hub.CancelNotificationAsync(scheduled.ScheduledNotificationId);
MOBILE CAMP
ROMA, 12 Febbraio 2015
22
MOBILE CAMP
ROMA, 12 Febbraio 2015
23
var registration = await hub.RegisterNativeAsync(channel.Uri, tagsToSubscribeTo);
await hub.UnregisterAsync(registration);
await hub.UnregisterNativeAsync();
await hub.UnregisterAllAsync(channel.Uri);
Notification Hub
• Azure
• MSDN
• Windows Store (WinRT) tutorial
• Windows Phone (Silverlight) tutorial
• Android tutorial
• iOS tutorial
• Kindle tutorial
Windows toast and tile template catalogs
• Toast template catalog
• Tile template catalog
MOBILE CAMP
ROMA, 12 Febbraio 2015
24
MOBILE CAMP
ROMA, 12 Febbraio 2015
25
Q&A
MOBILE CAMP
ROMA, 12 Febbraio 2015
26
Feedback form

More Related Content

Similar to Azure Notification hub

2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile ServicesMarco Parenzan
 
Cloud-enabling the Next Generation of Mobile Apps
Cloud-enabling the Next Generation of Mobile AppsCloud-enabling the Next Generation of Mobile Apps
Cloud-enabling the Next Generation of Mobile AppsNick Landry
 
Mobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsMobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsAdam Grocholski
 
Pivotal spring boot-cloud workshop
Pivotal   spring boot-cloud workshopPivotal   spring boot-cloud workshop
Pivotal spring boot-cloud workshopSufyaan Kazi
 
GOAppZone Data Sheet
GOAppZone Data SheetGOAppZone Data Sheet
GOAppZone Data Sheetykaralis
 
Feed Herny developer training : crossplatform and HTML5
Feed Herny developer training : crossplatform and  HTML5Feed Herny developer training : crossplatform and  HTML5
Feed Herny developer training : crossplatform and HTML5Mobile Monday Brussels
 
VMware Horizon Customer Presentation EN
VMware Horizon Customer Presentation ENVMware Horizon Customer Presentation EN
VMware Horizon Customer Presentation ENDaron Walker
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...Jitendra Bafna
 
Product Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyProduct Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyBui Kiet
 
Product Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyProduct Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyMuleSoft
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonPCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonVMware Tanzu
 
Building mobile back ends with windows azure mobile services
Building mobile back ends with windows azure mobile servicesBuilding mobile back ends with windows azure mobile services
Building mobile back ends with windows azure mobile servicesAidan Casey
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCodemotion
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los AngelesVMware Tanzu
 
How-to-handle-all-kind-of-notifications.pdf
How-to-handle-all-kind-of-notifications.pdfHow-to-handle-all-kind-of-notifications.pdf
How-to-handle-all-kind-of-notifications.pdfHammam Oktajianto
 
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...Vidyasagar Machupalli
 

Similar to Azure Notification hub (20)

2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services
 
Cloud-enabling the Next Generation of Mobile Apps
Cloud-enabling the Next Generation of Mobile AppsCloud-enabling the Next Generation of Mobile Apps
Cloud-enabling the Next Generation of Mobile Apps
 
Mobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsMobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification Hubs
 
Pivotal spring boot-cloud workshop
Pivotal   spring boot-cloud workshopPivotal   spring boot-cloud workshop
Pivotal spring boot-cloud workshop
 
NativeScript + Push Notifications
NativeScript + Push NotificationsNativeScript + Push Notifications
NativeScript + Push Notifications
 
GOAppZone Data Sheet
GOAppZone Data SheetGOAppZone Data Sheet
GOAppZone Data Sheet
 
Cloud Foundry May 1 2014
Cloud Foundry May 1 2014Cloud Foundry May 1 2014
Cloud Foundry May 1 2014
 
Feed Herny developer training : crossplatform and HTML5
Feed Herny developer training : crossplatform and  HTML5Feed Herny developer training : crossplatform and  HTML5
Feed Herny developer training : crossplatform and HTML5
 
VMware Horizon Customer Presentation EN
VMware Horizon Customer Presentation ENVMware Horizon Customer Presentation EN
VMware Horizon Customer Presentation EN
 
Jelastic Turnkey Cloud PaaS for Developers
Jelastic Turnkey Cloud PaaS for DevelopersJelastic Turnkey Cloud PaaS for Developers
Jelastic Turnkey Cloud PaaS for Developers
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
 
Product Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyProduct Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API Economy
 
Product Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API EconomyProduct Keynote: How to Compete in the API Economy
Product Keynote: How to Compete in the API Economy
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - LondonPCF: Platform for a New Era - Kubernetes for the Enterprise - London
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
 
Building mobile back ends with windows azure mobile services
Building mobile back ends with windows azure mobile servicesBuilding mobile back ends with windows azure mobile services
Building mobile back ends with windows azure mobile services
 
What's New with IBM UrbanCode Deploy
What's New with IBM UrbanCode DeployWhat's New with IBM UrbanCode Deploy
What's New with IBM UrbanCode Deploy
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platform
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
How-to-handle-all-kind-of-notifications.pdf
How-to-handle-all-kind-of-notifications.pdfHow-to-handle-all-kind-of-notifications.pdf
How-to-handle-all-kind-of-notifications.pdf
 
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
 

More from Luca Di Fino

Creare una classe virtuale con Teams e OneNote Class Notebook
Creare una classe virtuale con Teams e OneNote Class NotebookCreare una classe virtuale con Teams e OneNote Class Notebook
Creare una classe virtuale con Teams e OneNote Class NotebookLuca Di Fino
 
Teams e OneNote nella didattica BYOD: parte 1
Teams e OneNote nella didattica BYOD: parte 1Teams e OneNote nella didattica BYOD: parte 1
Teams e OneNote nella didattica BYOD: parte 1Luca Di Fino
 
Tecnologie per una didattica inclusiva - link
Tecnologie per una didattica inclusiva - linkTecnologie per una didattica inclusiva - link
Tecnologie per una didattica inclusiva - linkLuca Di Fino
 
Windows 10 app design
Windows 10 app designWindows 10 app design
Windows 10 app designLuca Di Fino
 
Accesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data PlatformAccesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data PlatformLuca Di Fino
 
Data binding for dummies - Microsoft publish 2014
Data binding for dummies - Microsoft publish 2014Data binding for dummies - Microsoft publish 2014
Data binding for dummies - Microsoft publish 2014Luca Di Fino
 
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISS
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISSIo ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISS
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISSLuca Di Fino
 
Passaggio dell’elettricità nei gas
Passaggio dell’elettricità nei gasPassaggio dell’elettricità nei gas
Passaggio dell’elettricità nei gasLuca Di Fino
 

More from Luca Di Fino (8)

Creare una classe virtuale con Teams e OneNote Class Notebook
Creare una classe virtuale con Teams e OneNote Class NotebookCreare una classe virtuale con Teams e OneNote Class Notebook
Creare una classe virtuale con Teams e OneNote Class Notebook
 
Teams e OneNote nella didattica BYOD: parte 1
Teams e OneNote nella didattica BYOD: parte 1Teams e OneNote nella didattica BYOD: parte 1
Teams e OneNote nella didattica BYOD: parte 1
 
Tecnologie per una didattica inclusiva - link
Tecnologie per una didattica inclusiva - linkTecnologie per una didattica inclusiva - link
Tecnologie per una didattica inclusiva - link
 
Windows 10 app design
Windows 10 app designWindows 10 app design
Windows 10 app design
 
Accesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data PlatformAccesso ai dati con Azure Data Platform
Accesso ai dati con Azure Data Platform
 
Data binding for dummies - Microsoft publish 2014
Data binding for dummies - Microsoft publish 2014Data binding for dummies - Microsoft publish 2014
Data binding for dummies - Microsoft publish 2014
 
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISS
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISSIo ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISS
Io ne ho viste cose... I raggi cosmici e l’esperimento ALTEA sulla ISS
 
Passaggio dell’elettricità nei gas
Passaggio dell’elettricità nei gasPassaggio dell’elettricità nei gas
Passaggio dell’elettricità nei gas
 

Recently uploaded

Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Recently uploaded (20)

Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

Azure Notification hub

  • 1. Azure Notification Hub Luca Di Fino dev.luke2375@live.it @luke2375 luke2375.wordpress.com MICROSOFT MOBILE CAMP ROMA, 12 Febbraio 2015
  • 2. Agenda • Overview • Azure Notification Hub • Let’s start • Hub • App • Push • Something more • More notifications • More channels • More apps • Q&A MOBILE CAMP ROMA, 12 Febbraio 2015
  • 3. • Push Notifications offer developers a way to send timely information relating to their applications even when they are not running • Push notifications are delivered through platform-specific infrastructures called Platform Notification Systems (PNS) +Windows has the unique ability to provide the end user glanceable access to the information they care most about, via Live Tiles MOBILE CAMP ROMA, 12 Febbraio 2015 3 Back-end PNS Device 1 2 3 4 Retrieve PNS Handle Store PNS Handle Send Notification Send to Device
  • 4. • Users management • Platform dependency • Scale • Refresh handles • Multicast • Routing • Monitor and telemetry MOBILE CAMP ROMA, 12 Febbraio 2015 4
  • 5. MOBILE CAMP ROMA, 12 Febbraio 2015 5
  • 7. • Device token management • Multiple platforms • Scale • Works with any backend • .NET, Node.JS, REST API, PHP, Java, etc. • Efficient tag-based multicast and pub/sub routing • Personalization • Rich telemetry MOBILE CAMP ROMA, 12 Febbraio 2015
  • 8. MOBILE CAMP ROMA, 12 Febbraio 2015 8
  • 9. Demo MOBILE CAMP ROMA, 12 Febbraio 2015 9 +
  • 10. 1. Create the notification hub – Azure 2. Get app SID and Secret – Dev Center (Windows or Windows Phone) 3. Configure hub 4. Create client app – Visual Studio 5. Create app backend MOBILE CAMP ROMA, 12 Febbraio 2015
  • 11. MOBILE CAMP ROMA, 12 Febbraio 2015 11
  • 12. MOBILE CAMP ROMA, 12 Febbraio 2015 12 1 2
  • 13. MOBILE CAMP ROMA, 12 Febbraio 2015 13 1 2
  • 14. MOBILE CAMP ROMA, 12 Febbraio 2015 14 SID Secret
  • 15. MOBILE CAMP ROMA, 12 Febbraio 2015 15
  • 16. MOBILE CAMP ROMA, 12 Febbraio 2015 16 string notificationHubPath = NOME_HUB; string connectionString = DefaultListenSharedAccessSignature; hub = new NotificationHub(notificationHubPath, connectionString); var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); await hub.RegisterNativeAsync(channel.Uri); • Add Nuget package WindowsAzure.Messaging.Managed • Set Toast capable in .appxmanifest • Create and register Notification Channel in app.xaml.cs
  • 17. • Add Nuget package WindowsAzure.ServiceBus • Create the hub • Send native notifications MOBILE CAMP ROMA, 12 Febbraio 2015 17 private NotificationHubClient hub; hub = NotificationHubClient.CreateClientFromConnectionString(endpoint, hubname); await hub.SendWindowsNativeNotificationAsync(XMLpayload); //WinRT await hub.SendMpnsNativeNotificationAsync(XMLpayolad); //Silverlight await hub.SendAppleNativeNotificationAsync(JSONpayload); //iOS await hub.SendGcmNativeNotificationAsync(JSONpayload); //Android
  • 18. MOBILE CAMP ROMA, 12 Febbraio 2015 18 ToastText01 ToastImageAndText01
  • 19. MOBILE CAMP ROMA, 12 Febbraio 2015 19 TileSquareImage/TileSquare150x150Image TileSquarePeekImageAndText02
  • 20. • What if we want more granular control over notifications? • If we want to push notifications only to people who are subscribed to a specific category, we use tags. App Backend Combine tags with AND (&&), OR (||), NOT (!) and parentheses. Tag expressions are limited to 20 tags if they contain only ORs; otherwise they are limited to 6 tags MOBILE CAMP ROMA, 12 Febbraio 2015 20 string[] tagsToSubscribeTo = { "phone", "news" }; await hub.RegisterNativeAsync(channel.Uri, tagsToSubscribeTo); await hub.SendWindowsNativeNotificationAsync(toast, "phone"); await hub.SendWindowsNativeNotificationAsync(toast, "phone && news"); await hub.SendWindowsNativeNotificationAsync(toast, "phone || news");
  • 21. • When in Standard tier, Notification Hubs supports a feature that enables you to schedule notifications up to 7 days in the future • To cancel a scheduled notification There are no limits on the number of scheduled notifications you can send MOBILE CAMP ROMA, 12 Febbraio 2015 21 Notification notification = new AppleNotification("{"aps":{"alert":"Happy birthday!"}}"); var scheduled = await hub.ScheduleNotificationAsync(notification, new DateTime(2014, 7, 19, 0, 0, 0)); await hub.CancelNotificationAsync(scheduled.ScheduledNotificationId);
  • 22. MOBILE CAMP ROMA, 12 Febbraio 2015 22
  • 23. MOBILE CAMP ROMA, 12 Febbraio 2015 23 var registration = await hub.RegisterNativeAsync(channel.Uri, tagsToSubscribeTo); await hub.UnregisterAsync(registration); await hub.UnregisterNativeAsync(); await hub.UnregisterAllAsync(channel.Uri);
  • 24. Notification Hub • Azure • MSDN • Windows Store (WinRT) tutorial • Windows Phone (Silverlight) tutorial • Android tutorial • iOS tutorial • Kindle tutorial Windows toast and tile template catalogs • Toast template catalog • Tile template catalog MOBILE CAMP ROMA, 12 Febbraio 2015 24
  • 25. MOBILE CAMP ROMA, 12 Febbraio 2015 25
  • 26. Q&A MOBILE CAMP ROMA, 12 Febbraio 2015 26 Feedback form

Editor's Notes

  1. Device token management store and manage channel URIs and device tokens used by Platform Notification Services securely handle the PNS feedback, device token expiry Scale broadcast to millions of devices with low latency Backend .NET, Node.JS, REST API, PHP, Java Personalization Each device can have one or more templates, to achieve per-device localization and personalization without affecting back-end code.