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
www.AgeofMobility.com
http://www.bigbaldapps.com
www.AgeofMobility.com
@ActiveNick 2005-20142013-2014
Hosting Your Stuff in the Cloud
Microsoft
Azure
Demo: Whirlwind Tour of
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
Data
Azure SQL db
Azure Table Storage
Azure Blob Storage
Mongo DBSQL Server
in a VM
SQL Server On-Prem
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
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
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)
Registration at app launch1.
2.
Sending Notification1.
2.
Maintenance1.
Platform
Notification
Service
App back-end
One-time set up1.
Register1.
2.
Send Notification1.
2.
APNsWNS
Notification Hub
App back-end
iOS app Windows app
MPNS
GCM
ADM
Demo:
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)
{…
});
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
10s
3+ <2
100s
3+ 150+
• 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
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
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
http://aka.ms/wpdevsetup
http://blogs.windows.com/buildingapps
www.AgeofMobility.com
www.dvlup.com
http://appstudio.windows.com
http://flip.it/95YFG
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]