SlideShare una empresa de Scribd logo
1 de 43
http://bit.ly/1eUqxYS
Platinum
Sponsors

Gold Sponsors

Silver
Sponsors
Contact Me
adam grocholski

adgroc@microsoft.com
@codel8r
thinkfirstcodelater.com
Windows News app uses
Notification Hubs
Client app

Platform
Notification
Service

App back-end
iOS app

Windows Store
app

App back-end

APNs

Notification Hub

WNS
var hub = new NotificationHub(“<hub name>", "<connection string>");
var channel = await
PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
await hub.RegisterNativeAsync(channel.Uri);
var hubClient =
NotificationHubClient.CreateClientFromConnectionString("<connection
string>", “<hub name>");
var toast = @“<notification payload>";
hubClient.SendWindowsNativeNotificationAsync(toast);
(void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken {
…
SBNotificationHub* hub = [[SBNotificationHub alloc] initWithConnectionString:
@"<connection string>" notificationHubPath:@"mynh"];
[hub registerNativeWithDeviceToken:deviceToken tags:nil completion:^(NSError* error) {
if (error != nil) {
NSLog(@"Error registering for notifications: %@", error);
}
}];
}
In your main activity:

Notification Hub hub = new NotificationHub("<hub name>", "<connection
string>", context);

GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);
String regid = gcm.register(SENDER_ID);
NativeRegistration r = hub.register(regid);
var hubClient =
NotificationHubClient.CreateClientFromConnectionString("<connection
string>", “<hub name>");
var toastForIos = @“<notification payload>";
hubClient.SendAppleNativeNotificationAsync(toastForIos);

var toastForAndroid = @“<notification payload>";
hubClient.SendGcmNativeNotificationAsync(toastForAndroid);
var azure = require('azure');
var notificationHubService =
azure.createNotificationHubService('hubname', 'connectionString');
notificationHubService.wns.sendToastText01(null,
{
text1: 'Hello from Node and Mobile Services!'
},
function (error)
{
if (!error) { // message sent successfully }
}
);
No need to store and maintain ChannelURIs.
Device registrations expire.
App back-end
Tag:”Beatles”

Notification Hub

Tag:”Wailers”

Tag:”Beatles”
Notification Hub
App back-end
// POST api/register
public async void Post(bool instId, bool channelUri, bool userId) {
// We assume a windows store app (if coding a multiplatform app, a ‘platform‘ parameter should be passed)
…
if (!authorizedToRegisterTag(userId))
{ throw new Exception("User not authorized to register"); }
var regsForInstId = await hubClient.GetRegistrationsByTag(instId, 100);
bool updated = false;
bool firstRegistration = true;
foreach (var registrationDescription in regsForInstId) {
if (firstRegistration) {
var winReg = registrationDescription as WindowsRegistrationDescription;
winReg.ChannelUri = new Uri(channelUri);
winReg.Tags.Clear();
winReg.Tags.UnionWith(new string[] {instId, userId});
hubClient.UpdateRegistration(winReg);
updated = true;
firstRegistration = false;
} else {
// if templates are not used, delete all extra registrations with this installation id.
hubClient.DeleteRegistration(registrationDescription);
}
}
// if not updated, a new registration has to be created for the device
if (!updated) {
hubClient.CreateWindowsNativeRegistration(channelUri, new string[] {instId, userId});
}
}
<toast>
<visual>
<binding template="ToastText01">
<text id="1">$(message)</text>
</binding>
</visual>
</toast>

Hello!
{ message: “Hello!” }

App back-end

Service Bus
Notification Hub
Hello!

{
aps: {
alert: “$(message)”
}
}
<toast>
<visual>
<binding template="ToastText01">
<text id="1">$(tempF)</text>
</binding>
</visual>
</toast>

73
{tempC: “23”, tempF: “73”}

App back-end

Service Bus
Notification Hub
23

{
aps: {
alert: “$(tempC)”
}
}
What Next?
Try it out. For Free.
Build what you want. Scale as you need. Full access with no strings
attached.

http://aka.ms/thecloud

Hello startups!
You have an ideas so brilliant it burns. BizSpark can help make it real.

http://aka.ms/JoinBizSpark or CONTACT ME!
DVLUP – NOKIA’S REWARDS PROGRAM
COMPLETE APP CHALLENGES – EARN POINTS – GET COOL STUFF

Engage via
Gamification
& Rewards

Targeted &
Curated App
Challenges

Redeem earned
points for
Phones, Accessori
es, Dev Tools and
App Promotion

Over $5 million
worth of Rewards
and Campaigns

dvlup.com
Contact Me
adam grocholski

adgroc@microsoft.com
@codel8r
thinkfirstcodelater.com
St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mobile Devices

Más contenido relacionado

La actualidad más candente

Travel management
Travel managementTravel management
Travel management
1Parimal2
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
Swarup Kumar Boro
 

La actualidad más candente (20)

c++ project on restaurant billing
c++ project on restaurant billing c++ project on restaurant billing
c++ project on restaurant billing
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Rx.NET, from the inside out - Codemotion 2018
Rx.NET, from the inside out - Codemotion 2018Rx.NET, from the inside out - Codemotion 2018
Rx.NET, from the inside out - Codemotion 2018
 
Travel management
Travel managementTravel management
Travel management
 
描画とビジネスをクリーンに分ける(公開用)
描画とビジネスをクリーンに分ける(公開用)描画とビジネスをクリーンに分ける(公開用)
描画とビジネスをクリーンに分ける(公開用)
 
wcmc_practicals
wcmc_practicalswcmc_practicals
wcmc_practicals
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Telephone billing system in c++
Telephone billing system in c++Telephone billing system in c++
Telephone billing system in c++
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
 
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
 
c++ program for Canteen management
c++ program for Canteen managementc++ program for Canteen management
c++ program for Canteen management
 
Mirage For Beginners
Mirage For BeginnersMirage For Beginners
Mirage For Beginners
 
Student Data Base Using C/C++ Final Project
Student Data Base Using C/C++ Final ProjectStudent Data Base Using C/C++ Final Project
Student Data Base Using C/C++ Final Project
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
Introduction to Zend Framework web services
Introduction to Zend Framework web servicesIntroduction to Zend Framework web services
Introduction to Zend Framework web services
 

Destacado

Google DevFest MN - Windows Azure Notification Hubs
Google DevFest MN - Windows Azure Notification HubsGoogle DevFest MN - Windows Azure Notification Hubs
Google DevFest MN - Windows Azure Notification Hubs
Adam Grocholski
 

Destacado (8)

2010 Presentation
2010  Presentation2010  Presentation
2010 Presentation
 
Nanotail Monitor Brintakis Linked In
Nanotail Monitor Brintakis Linked InNanotail Monitor Brintakis Linked In
Nanotail Monitor Brintakis Linked In
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Prophecy
ProphecyProphecy
Prophecy
 
St. Louis Day of .NET 2013 - Continuous Integration and Scripting with Window...
St. Louis Day of .NET 2013 - Continuous Integration and Scripting with Window...St. Louis Day of .NET 2013 - Continuous Integration and Scripting with Window...
St. Louis Day of .NET 2013 - Continuous Integration and Scripting with Window...
 
St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...
St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...
St. Louis Day of .NET 2013 - Building Your Dev and Test Sandbox with Windows ...
 
Google DevFest MN - Windows Azure Notification Hubs
Google DevFest MN - Windows Azure Notification HubsGoogle DevFest MN - Windows Azure Notification Hubs
Google DevFest MN - Windows Azure Notification Hubs
 
Mobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification HubsMobile March Windows Azure Notification Hubs
Mobile March Windows Azure Notification Hubs
 

Similar a St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mobile Devices

WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 

Similar a St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mobile Devices (20)

CloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stageCloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stage
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Creating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdfCreating an Uber Clone - Part XIII - Transcript.pdf
Creating an Uber Clone - Part XIII - Transcript.pdf
 
Day 5
Day 5Day 5
Day 5
 
Techdays 2012 - Windows Phone Push notifications & Life tiles
Techdays 2012 - Windows Phone Push notifications & Life tilesTechdays 2012 - Windows Phone Push notifications & Life tiles
Techdays 2012 - Windows Phone Push notifications & Life tiles
 
1. device onboarding
1. device onboarding1. device onboarding
1. device onboarding
 
WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.js
 
Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)
 
2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
 
44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...
44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...
44CON 2013 - .Net Havoc - Manipulating Properties of Dormant Server Side Web ...
 
Bot builder v4 HOL
Bot builder v4 HOLBot builder v4 HOL
Bot builder v4 HOL
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
Delivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in MinutesDelivering Millions of Push Notifications in Minutes
Delivering Millions of Push Notifications in Minutes
 
Webauthn Tutorial
Webauthn TutorialWebauthn Tutorial
Webauthn Tutorial
 
1. device onboarding pdf
1. device onboarding pdf1. device onboarding pdf
1. device onboarding pdf
 
"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin
 
Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010
 
Social Gold In-Flash Payments Webinar
Social Gold In-Flash Payments WebinarSocial Gold In-Flash Payments Webinar
Social Gold In-Flash Payments Webinar
 
GWT Training - Session 3/3
GWT Training - Session 3/3GWT Training - Session 3/3
GWT Training - Session 3/3
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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...
 

St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mobile Devices

Notas del editor

  1. Now, let us take a look at developers. Our whole strategy for developers is based on making them successful in the app economy. We need to invest today in our developer’s success to ensure a steady flow of apps, that will sell tomorrow’s devices. We recently announced a new initiative that helps developers succeed. It is called DVLUP.DVLUP brings together proven models of gamification and a rewards system (similar to frequent flyer programs in the airline industry) to encourage developers to engage with a development platform.In DVLUP, developers earn points while developing apps for targeted and curated app challenges.  This approach enables us to gain new developers, incentivize them to create apps that are relevant to the consumer and at the same time offer ways for developers to become successful, by supporting them in promoting and marketing their apps to a global audiance. We have launched DVLUP in 21 countries, And we are offering over $5 million worth of rewards to our developers.- Go to www.dvlup.com to find out more