Consuming Web Services in Android
-
Upload
david-truxall -
Category
Technology
-
view
322 -
download
0
description
Transcript of Consuming Web Services in Android
Consuming Web Services
Mobile • Develop • Design • Lead • Train • Troubleshoot
David Truxall, Ph.D.
@davetrux
http://blog.davidtruxall.com
https://github.com/davetrux/DevFest2013
Get the code
The Mobile Problem
(for developers)
Screen Real Estate
CPU Power
Memory Constrained
Network Bandwidth
Familiar?
XML
JSON
Web Services
Soap
REST
REpresentational State Transfer
GET
POST
PUT
DELETE
JavaScript Object Notation[ { "lastName": "Valdez", "firstName": "Christian", "gender": "m" }, { "lastName": "Alston", "firstName": "Christie", "gender": "f" }]
Where?
GoogleAmazonTwitterFacebookeBayBaas Providersprogrammableweb.com
Windows AzureGovernmentLinkedInFlickrYahooYelpYour company
Build Some!
Web Services and Android
Lots of Options
Not in an Activity
AsyncTask vs. Service
AsyncTask
Activity Considerations
Active when request completes
Paused then resumed and request completes
Paused when request completes then resumed
Demo
Services
Not a daemon or Windows Service
Like a cron job or scheduled task
IntentService vs. Service
Activity
IntentService
IntentServiceWeb
Services
Intent w/URL & params
REST + JSON
Intent w/data
Code
What's Missing
Persistence
HTTP Headers
Error Handling
Security
Configuration
Performance
Data size
Paging
gzip
Google IO 2010 Presentation
Services Documentation
Code on Github
This Presentation
My Blog
Resources
@davetrux