St. Louis Day of .NET 2013 - Delivering Push Notifications to Millions of Mobile Devices
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 319 views

Push notifications are critical to craft engaging app experience and increase usage and user interest. Windows Azure Notification Hubs support multi-platform push with Windows, iOS, and Android, ...

Push notifications are critical to craft engaging app experience and increase usage and user interest. Windows Azure Notification Hubs support multi-platform push with Windows, iOS, and Android, publish/subscribe routing to particular groups of users or devices, and low latency broadcast to millions of devices. Join us to learn how to use Notification Hubs to target millions of devices at once and single targeted users with just a few lines of code.

Statistics

Views

Total Views
319
Views on SlideShare
319
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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

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

  • 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