Building Mobile Cross-Platform Apps with the Cloud and Push Notifications

1,801 views

Published on

The best mobile applications don’t live in a vacuum. They are augmented by dedicated servers, the Internet and Cloud services. While it’s one thing to reach out to server-side services from a mobile application, it’s a completely different affair when the tables are turned and the server needs to reach the phone. Enter push notifications. From iOS to Android, Windows Phone and Windows 8, discover how to send push notifications from cloud-hosted services to a mobile app running on a tablet or phone, and learn how to handle those alerts in your mobile app. We’ll discuss the various push notification services from Microsoft, Apple and Google, how to leverage them in your mobile applications, how to deal with push scenarios for any given multi-platform app, and we’ll also look at Notification Hubs that can let you push millions of notifications with just a few lines of code. The live demo showcases a real-world app designed for Windows Phone, Windows, iOS and Android with a common cloud backend built with Node.js.

Contact me if you would like me to present this session at your event.

Published in: Technology
  • Be the first to comment

Building Mobile Cross-Platform Apps with the Cloud and Push Notifications

  1. 1. www.AgeofMobility.com
  2. 2.     http://www.bigbaldapps.com         www.AgeofMobility.com  @ActiveNick 2005-20142013-2014
  3. 3.      
  4. 4. Hosting Your Stuff in the Cloud Microsoft Azure
  5. 5. Demo: Whirlwind Tour of
  6. 6.      
  7. 7. Node.js Express .NET Web API SQL Table Storage Blob Storage WNS & MPNS APNS GCM Mongo DB Notification Hubs Source Control Facebook Twitter Microsoft Google Azure Active Directory Windows Store iOS Android Xamarin Phonegap Sencha Windows Phone iOS Android HTML 5/JS SDKs RESTAPI Hybrid Connections
  8. 8.      Data Azure SQL db Azure Table Storage Azure Blob Storage Mongo DB SQL Server in a VM SQL Server On-Prem
  9. 9. Action HTTP Verb URL Suffix Create POST /TodoItem Read GET /TodoItem?$filter=id%3D42 Update PATCH /TodoItem/id Delete DELETE /TodoItem/id Data Operations and their REST Equivalents Base REST API Endpoint URL https://Mobileservice.azure-mobile.net/tables/* Odata protocol LINQ support for the C# SDK A Basic table
  10. 10.           
  11. 11.        
  12. 12. Server-initiated communication Richer than SMS, 10,000s times cheaper Multitasking: Enable key background tasks Prevent polling for user updates Preserve device battery life Advanced Scenarios: e.g “Push to Sync” App Differentiation User Relationship
  13. 13. Windows 8.x/WP8.1: Windows Push Notification Service (WNS) Windows Phone 8: Microsoft Push Notification Service (MPNS) iOS (Apple): Apple Push Notification Service (APNS) Android (Google): Google Cloud Messaging (GCM)
  14. 14. Registration at app launch 1. 2. Sending Notification 1. 2. Maintenance 1. Platform Notification Service App back-end
  15. 15.          
  16. 16. One-time set up 1. Register 1. 2. Send Notification 1. 2. APNsWNS Notification Hub App back-end iOS app Windows app MPNS GCM ADM
  17. 17. Demo:
  18. 18. await [hub registerNativeWithDeviceToken:deviceToken tags:nil completion:^(NSError* error) { … }]; hub.register(regid); var toast = @“<notification payload>"; hub.SendWindowsNativeNotificationAsync(toast); hubService.wns.sendToastText01(null, { text1: 'Hello from Node!' }, function (error) { … } );
  19. 19.       
  20. 20. Reservation changes, Deals, Back-office Travel/Hospitality/Airlines SMS replacement, Deals, Back-office Banking/Insurance Orders, Product UX, Back-office Discrete manufacturing/Auto Prescriptions, Appointments, LOB (maintenance) Healthcare Breaking news News/Media Offers, Orders, Back-office Retail
  21. 21. 10s 3+ <2 100s 3+ 150+
  22. 22. • Notification Hubs service page • Get started (Windows/Phone, iOS, Android, Kindle) • MSDN documentation • APIs references and download • REST surface documentation • Debugging guide • Pricing • Cloud Cover 116 – X-plat notifications • Cloud Cover 118 – Geo-location • Azure Friday – Broadcasting • Azure Friday – Tags • Azure Friday – Templates • Azure Friday – User-specific notifications
  23. 23.  http://channel9.msdn.com/Events/Build/2014/2-616  http://channel9.msdn.com/Events/Build/2014/2-521  http://channel9.msdn.com/Events/Build/2014/3-623  http://channel9.msdn.com/Events/Build/2014/3-622  http://channel9.msdn.com/Events/Build/2014/2-518
  24. 24.   http://aka.ms/wp81js   http://channel9.msdn.com/Events/Build/2014   www.microsoftvirtualacademy.com/product-training/windows-phone   http://code.msdn.microsoft.com/wpapps/Windows-Phone-81-samples-08631ca7
  25. 25.  http://aka.ms/wpdevsetup  http://blogs.windows.com/buildingapps  www.AgeofMobility.com  www.dvlup.com  http://appstudio.windows.com  http://flip.it/95YFG
  26. 26. Thank You! Slides will be posted on my Slideshare account. Demos are on GitHub. Slideshare: www.slideshare.net/ActiveNick Blog: www.AgeofMobility.com Twitter: @ActiveNick Mobile Apps: www.bigbaldapps.com LinkedIn: www.linkedin.com/in/activenick GitHub: github.com/ActiveNick Email: nick.landry@microsoft.com

×