consuming web services in android
DESCRIPTION
My presentation from Michigan Google Developers DevFest 2013. As mobile apps continue to get more sophisticated, they need data, whether it’s the from the business backend or the current scoreboard for a game server hosted in the cloud. Find out how to connect to and consume web services with your Android application. Get connected to the cloud, working with REST web services and learning how to parse the results.TRANSCRIPT
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