building mobile cross-platform apps with the cloud and push notifications
DESCRIPTION
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.TRANSCRIPT
![Page 1: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/1.jpg)
www.AgeofMobility.com
![Page 2: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/2.jpg)
http://www.bigbaldapps.com
www.AgeofMobility.com
@ActiveNick 2005-20142013-2014
![Page 3: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/3.jpg)
![Page 4: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/4.jpg)
Hosting Your Stuff in the Cloud
Microsoft
Azure
![Page 5: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/5.jpg)
Demo: Whirlwind Tour of
![Page 6: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/6.jpg)
![Page 7: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/7.jpg)
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
REST A
PI
Hybrid Connections
![Page 8: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/8.jpg)
Data
Azure SQL db
Azure Table Storage
Azure Blob Storage
Mongo DBSQL Server
in a VM
SQL Server On-Prem
![Page 9: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/9.jpg)
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
![Page 10: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/10.jpg)
![Page 11: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/11.jpg)
![Page 12: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/12.jpg)
![Page 13: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/13.jpg)
Server-initiated
communicationRicher 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
![Page 14: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/14.jpg)
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)
![Page 15: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/15.jpg)
Registration at app launch1.
2.
Sending Notification1.
2.
Maintenance1.
Platform
Notification
Service
App back-end
![Page 16: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/16.jpg)
![Page 17: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/17.jpg)
One-time set up1.
Register1.
2.
Send Notification1.
2.
APNsWNS
Notification Hub
App back-end
iOS app Windows app
MPNS
GCM
ADM
![Page 18: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/18.jpg)
Demo:
![Page 19: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/19.jpg)
await
[hub registerNativeWithDeviceToken:deviceTokentags:nilcompletion:^(NSError* error) { … }];
hub.register(regid);
var toast = @“<notification payload>";hub.SendWindowsNativeNotificationAsync(toast);
hubService.wns.sendToastText01(null, {
text1: 'Hello from Node!'},function (error)
{…
});
![Page 20: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/20.jpg)
![Page 21: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/21.jpg)
![Page 22: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/22.jpg)
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
![Page 23: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/23.jpg)
10s
3+ <2
100s
3+ 150+
![Page 24: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/24.jpg)
• 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
![Page 25: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/25.jpg)
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
![Page 26: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/26.jpg)
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
![Page 27: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/27.jpg)
http://aka.ms/wpdevsetup
http://blogs.windows.com/buildingapps
www.AgeofMobility.com
www.dvlup.com
http://appstudio.windows.com
http://flip.it/95YFG
![Page 28: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/28.jpg)
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: [email protected]
![Page 29: Building Mobile Cross-Platform Apps with the Cloud and Push Notifications](https://reader033.vdocuments.us/reader033/viewer/2022042814/554f7453b4c9058a148b54fc/html5/thumbnails/29.jpg)