building cloud connected ios android and windows apps n.
Skip this Video
Download Presentation
Building Cloud-Connected iOS, Android and Windows Apps

Loading in 2 Seconds...

play fullscreen
1 / 43

Building Cloud-Connected iOS, Android and Windows Apps - PowerPoint PPT Presentation

  • Uploaded on

Building Cloud-Connected iOS, Android and Windows Apps. Kirill Gavrylyuk | Principal Program Manager Lead, Azure Mobile Miranda Luna | Product Manager, Azure Mobile. Course Topics. Please leave this area blank to allow for picture in picture recording. Setting Expectations. Target Audience

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Building Cloud-Connected iOS, Android and Windows Apps' - samantha-koch

Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
building cloud connected ios android and windows apps

Building Cloud-Connected iOS, Android and Windows Apps

Kirill Gavrylyuk | Principal Program Manager Lead, Azure Mobile

Miranda Luna | Product Manager, Azure Mobile

setting expectations

Please leave this area blank to allow for picture in picture recording

Setting Expectations
  • Target Audience
    • Developers building iOS, Android and Windows apps,

whether natively or with a cross-platform framework

  • Suggested Prerequisites/Supporting Material
    • MVA Consumer Mobile Apps that Scale
    • Channel9 Azure Mobile Services Learning Series
join the mva community
Join the MVA Community!
  • Microsoft Virtual Academy—Free online training!
  • Ask questions in the Born to Learn MVA Forum!
    • Visit
  • Earn while you learn!
    • 50 MVA Points for this event!
    • Visit
    • Code: BldgBlks3
Push Notifications

Mobile push notification engine for existing apps

Enhance push notifications in any app with personalization and localization

Improves user engagement and retention by delivering relevant content more quickly

Mobile Backend

Ready-made mobile app backend for iOS, Android and Windows

Create new mobile apps or add a mobility layer to existing systems

Speeds up development time and reduces ongoing maintenance cost

Device Messaging

Messaging infrastructure that sits between and within applications

Build multi-tier and hybrid applications or smart device information exchange patterns

Delivers inter- and intra-app messages faster and connects on-premises systems to the cloud


Mobile Services Overview

Mobile Services App Backend can be Node.js or .NET

Store Data in the Cloud


Windows Store





Windows Phone




Custom Code


Node.js Express

Table Storage

Blob Storage

Mongo DB


User Authentication


Active Directory





Push Notifications

Source Control


Notification Hubs



supported platforms
Supported Platforms





Xamarin (iOS & Android in C#)



Native Win8/ WinPhone




Please leave this area blank to allow for picture in picture recording

  • A single mobile service can power multiple client apps
  • LensRocket sample
    • iOS App Store:
    • Google Play Store:
    • iOS source code:
    • Android source code:
    • More:
    • @ChrisRisner
  • Azure SQL database by default
    • Many other options
  • Alternatively, use blob storage, table storage, SQL in a VM, or Oracle in a VM through the azure module for node.js or even on-prem SQL Server through Service Bus Relay
    • .NET runtime provides additional flexibility
  • Full control over your data in all scenarios

SQL Server On-Prem

SQL Server in a VM

Mongo DB

Azure SQL db

Azure Table Storage

Azure Blob Storage

data in lensrocket

Please leave this area blank to allow for picture in picture recording

Data in LensRocket
  • SQL database tables for
    • AccountData
    • Friends
    • Messages
    • RocketFile
    • UserPreferences
  • Blob Storage for
    • Storing Rocket image files
      • Connect w/ SAS URL from Mobile Services then send a POST to blob storage
table api
“Table” API

Base Table API URL*

OData CRUD endpoints

custom api
Custom API
  • Node.js Express Controllers
  • Full control over HTTP
  • Mobile Services takes care of Auth, basic Authz, push, monitoring
custom apis in lensrocket

Please leave this area blank to allow for picture in picture recording

Custom APIs in LensRocket
  • Custom APIs for
    • AcceptFriendRequest
    • GetRocketForRecipient
    • Login
    • Register
    • RequestFriend
    • SaveUsername
    • SendRocketToFriends
mobile services net backend
Mobile Services .NET backend
  • ASP.NET WebAPI based
  • Custom API  Regular ApiController
  • Table API  XXXTableController
    • Helpful ODATA CRUD abstractions over various data backends
  • Transparent data access
  • Built-in auth, authz, push, monitoring, etc.
  • Client SDKs work with Mobile Services Node and .NET backends
  • We run, manage, and monitor your Mobile Service
source control and deployment
Source Control and Deployment

Mobile Services

(git repository)

TFS or GitHub

(git repository)

Local git repository


npm install azure-cli --g

azure mobile create | delete | list | show

azure mobile restart

azure mobile config list | get | set

azure mobile table | data

azure mobile script | api //use source control instead

azure mobile job

unit testing
Unit testing


var mock = require(“zumock”);

//inspired by mocha


NUnit, MSTest, etc

Local F5, local debugging

add version to your client calls
Add version to your client calls

- (void)handleRequest:(NSURLRequest *)request next:(MSFilterNextBlock)next response:(MSFilterResponseBlock)response


MSFilterResponseBlockwrappedResponse = ^(NSHTTPURLResponse *innerResponse, NSData *data, NSError *error) {

response(innerResponse, data, error);


// add additional versioning information to the querystring for versioning purposes

NSString *append = [NSStringstringWithFormat:@"build=%@&version=%@",, self.version];

NSURL *url = nil;

NSRange range = [request.URL.absoluteStringrangeOfString:@"?"];

if (range.length > 0) {

url = [NSURL URLWithString:[NSStringstringWithFormat:@"%@&%@&p=iOS", request.URL.absoluteString, append]];


else {

url = [NSURL URLWithString:[NSStringstringWithFormat:@"%@?%@&p=iOS", request.URL.absoluteString, append]];


NSMutableURLRequest *newRequest = [request mutableCopy];

newRequest.URL = url;

next(newRequest, wrappedResponse);


add version to your client calls1
Add version to your client calls

public static MobileServiceClientMobileService = new MobileServiceClient(

"https://<your subdomain>",

"<your app key>",

new VersionHandler()


using System;

using System.Net.Http;

using System.Threading.Tasks;

namespace WindowsStore


public class VersionHandler : DelegatingHandler


protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,



request.RequestUri = new Uri(request.RequestUri.AbsoluteUri.ToString() + "?version=v2");

return base.SendAsync(request, cancellationToken);




support multiple client versions in your scripts
Support multiple client versions in your scripts

function insert(item, user, request) {

if ( < 2.0) {

item.description = 'Not entered';



success : function() {

if ( < 2.0) {

delete item.description;






mobile push notifications 101
Mobile Push Notifications 101
  • Register device handle at app launch
      • Client app contacts Platform Notification Service (PNS)
      • App updates handle in backend

client app

  • Send Notification
      • App backend sends notification to PNS
      • PNS pushes the notification to the app on the device




  • Maintain device handles
      • Delete expired handles when PNS rejects them

App back-end

push notification challenges
Push Notification Challenges

While there are significant benefits to using push notifications in a mobile app, rolling your own push infrastructure is extremely difficult in terms of implementing a system capable of:

  • Cross-Platform Push Notifications

Each push service (APNS for iOS, GCM for Android, WNS for Windows, etc.) has different protocols (e.g., HTTP vs. TCP, xml payload vs. JSON payload)

  • Targeting on the server-side based on interest and location

Segmenting users based on interest tags and routing only the most relevant content to each segment

  • Personalizing notifications on the client-side based on language, currency, device, etc.

Each device displays notifications differently

  • High-Volume with Low Latency

Limited by the capability of each VM so need to spin up scores of VMs and shard your application in order to serve a large user base

  • Maintaining and accurate device handle registry

Adding registrations upon installation, updating tags, pruning upon rejection from push notification service (uninstall)


Azure Push Notifications

One-time set up

Create a Notification Hub


The client app retrieves its current handle from the PNS.

Client app (or app backend) registers the handle with Notification Hub

Send Notification

The app back-end sends a message to the Notification Hub.

Notification Hub pushes it to the PNS

Android app

iOS app

Windows 8.x


Notification Hub

App back-end





mobile services notification hubs
Mobile Services + Notification Hubs

Mobile Services now with Notification Hubs built-in

  • Cross-Platform Push Notifications
  • Instant broadcast to segments of your audience, or individual pushes to logical users
  • Personalization and localization
  • High-Volume with Low Latency
  • Device handles and PNS feedback is managed for you
cross platform push in lensrocket

Please leave this area blank to allow for picture in picture recording

Cross-Platform Push in LensRocket
  • Sending Push when
    • New Rocket arrives
    • New friend request received

var payload ='{ "message" : "You\'ve received a new rocket!", "collapse_key" : "NEWROCKET" }';

notificationHubService.send(newMessage.toUserId, payload,

  • function(error, outcome) {
  •                              console.log('issue sending push');
  •                              console.log('error: ', error);
  •                              console.log('outcome: ',outcome);
  •                          });
azure store

Please leave this area blank to allow for picture in picture recording

Azure Store
  • Azure Store launched at //Build (Oct 2012). Currently in preview state.
    • makes it easy for Azure users to find, buy, and manage third-party services which complement and extend the Azure experience.
  • Add third-party services just as you would add a virtual machine or website.
  • Purchase using the same payment instrument as your Azure subscription.
  • Subscription management within Azure portal.
  • Single sign-on to third-party portal for service specific management tasks.

Mobile Store Partners

tips for actually publishing to the store
Tips for Actually Publishing to the Store
  • Dev/Test Instance
    • Switch to using prod keys and info incl APNS cert, GCM API key
  • Make sure the permissions are as locked down as possible/access as restricted as possible
    • Turn off dynamic schema
  • Verify parameters, checking userIDs on all methods.
  • Authorization needs to be done in app code
  • Put in perf metrics (New Relic)
  • Put in usage metrics (Google)
  • Don’t put demo in the description
  • Have all the right assets
  • Get out of free mode
  • Auto-Scale
mobile at build
Mobile at //build
  • Building Cross-Platform Line of Business Apps with Mobile Services
    • Friday 4/4 12:30 – 1:30 PST
    • Donna Malayeri, Chris Risner
    • @lindydonna, @ChrisRisner
  • Mobile Push Notifications to Any Client with Azure Notification Hubs
    • Wednesday 4/2 5:30 – 6:30 PST
    • Elio Damaggio
    • @ElioDamaggio
  • Powerful mobile apps with Mobile Services and ASP.NET Web API
    • Thursday 4/3 5:30 – 6:30 PST
    • Kirill Gavrylyuk, Yavor Georgiev
    • @KirillG_MSFT, @theyavor
  • All videos will be available on Channel9
mobile services resources
Mobile Services Resources

Windows Azure Mobile Services Overview, Tutorials and Resources

Collection of Helpful Tutorials and Resources

Learn/Channel 9

SDKs on GitHub

REST API Reference

Windows Azure Pricing

UserVoice for Feature Requests

Microsoft Azure Certified Training

notification hubs resources
Notification Hubs Resources

Windows Azure Mobile Services Overview, Tutorials and Resources

Azure Documentation Center

MSDN Documenation

Android (tutorial)

iOS (tutorial)

Windows Store (tutorial)

Windows Phone (tutorial)

Learn/Channel 9Introduction | iOS | Windows Store | Tags and Templates

REST API Reference

Windows Azure Pricing

Microsoft Azure Certified Training