300 likes | 398 Vues
http://chrisrisner.com @ chrisrisner. Building Connected Android Apps. Chris Risner Technical Evangelist Microsoft. Let’s build an app! How Microsoft got here? Mobile Services Features and demos Win a prize Questions. What we’re going to talk about. Let’s build an app!.
E N D
http://chrisrisner.com @chrisrisner Building Connected Android Apps Chris Risner Technical Evangelist Microsoft
Let’s build an app! • How Microsoft got here? • Mobile Services • Features and demos • Win a prize • Questions What we’re going to talk about
What we had Storage Identity Cloud services
What we needed Cross Platform Features
What is Windows Azure Mobile Services? Auth Data Notifications Logging & Diag Server Logic Scheduler Scale
Getting Starteda backend for your mobile app in minutes Demo
Structured Storage Structured Storage with SQL Database Same DB – multiple Mobile Services AppX.Todoitem AppY.Todoitem Manage data in Portal, SQL Portal SQL Management Studio REST API CLI Tools
Server Logic Automatic REST API generated for storage Dynamic Schema on/off Ability to customize server logic that intercepts table requests
Server Logic Supported Modules + Globals request console push.* tables mssql statusCodes azure store (pusher, sendgrid, twilio, etc) mssql.query('select top 1 * from statusupdates', { success: function(results) { console.log(results); } } );
Push Notification Lifecycle Overview Mobile Services Android Register for push notifications Send Registration ID to Mobile Service Push from server side scripts App (2) (3) (1) GCM (3)
Push Notifications Demo
AuthData and Scripts Table level permissions for each CRUD operation Everyone Anyone with the Application Key Only Authenticated Users Only Scripts and Admins More granular control with server side scripts user.level: {admin, authenticated, anonymous} user.userId: id or undefined if not authenticated
Command Line Tools Create services Delete services Create (with auth options), update, delete, list tables Upload, delete, download, list scripts Get configuration
Using the CLI Demo
Scheduler Execute scripts on a Schedule by Minutes by Hours by Days By Months Execute scripts on Demand Examples Periodic purge of old data Poll and aggregate from 3rd party (Twitter, RSS, others) Process/resize images Schedule sending push notifications for a given time of day
Diagnostics, Logging and Scale Diagnostics API calls CPU Time Data Out Logging console.error(…) console.log(…) … Scale - Compute Scale out instance count Scale up VM size Scale - Storage Scale out mobile service tenant to dedicated SQL DB Scale up SQL DB
Pricing Example: $5/ Month Unlimited data in = <165MB daily out 100MB SQL Database 10 x Mobile Services on shared instances • How? • 10 FREE mobile services on shared instance • Includes 165MB/day of FREE data out from API calls • Cost - All services sharing a 100MB DB is $5 USD / Month • Use Pricing Calculator to Estimate your costs Note: Free data out is per subscription, not per mobile service
Summary Auth Data Notifications Logging & Diag Server Logic Scheduler Scale
e-mail: chrisner@microsoft.com • Complete the Quick Start challenge • 1 extra entry for showing use of Auth • 3 extra entries for showing use of push • Winner announced on 4/18 Win a JamBox
The QuickStart Challenge Sign up for the free trial at www.windowsazure.com/android Complete the Mobile Services QuickStart Send me an image (including your account e-mail in the corner) Entries must be submitted by Thursday 1pm PST E-mail chrisner@microsoft.com
Useful Resources Get a Windows Azure Free Trial Account http://www.windowsazure.com/ Learn more Find videos, tutorials and more at https://www.windowsazure.com/android Help with Mobile Services Q&A Forum: Windows Azure Mobile Services Forum Feature Rqst: Windows Azure Mobile Services UserVoice Feedback: mobileservices@microsoft.com Twitter: @chrisrisner Presentations, demos, hands on labs Windows Azure Training Kit: Download here