
By Anthony Dahanne
Leverage Spring for Android to create RESTful and OAuth Android apps
Overview
* study whatever new instantly! a brief, speedy, concentrated advisor providing quick results.
* examine what Spring for Android provides to the Android developer toolkit.
* easy methods to debug your Android conversation layer looking at HTTP requests and responses.
* Use OAuth to authenticate your clients and your app opposed to well known provider prone (Google, fb, Twitter, and so on).
In Detail
The danger to hook up with distant internet providers is a key function for many Android apps. relaxation (Representational nation move) is the most well-liked structure to supply net companies to cellular units and others. OAuth has lately turn into the web's favourite technique to authenticate and authorize clients and apps, due to its potential to re-use renowned net systems bills (Google, fb, Twitter). Spring for Android is an extension of the Spring Framework that goals to simplify the advance of local Android applications.
"Instant Spring for Android Starter" is a pragmatic, hands-on advisor that offers you with a couple of transparent step by step workouts, in an effort to assist you reap the benefits of the abstractions provided by means of Spring for Android with reference to relaxation (RestTemplate) and OAuth (OAuthTemplate). it is going to additionally introduce you to the bases of these architectures and the linked tooling.
This ebook will get you began utilizing Spring for Android, first letting you know the way to establish your workspace to incorporate these libraries on your tasks (with the Eclipse IDE and in addition with the preferred construction software Maven) after which offering a few transparent and actual existence examples of RESTful and OAUth sponsored Android applications.
After introducing the know-how, we'll detect different Message Converters supplied (to eat JSON, XML, and Atom internet companies) and the most HTTP verbs to engage with RESTful webservices: GET, put up, DELETE, and replace. We’ll additionally point out the way to help HTTP uncomplicated Auth, Gzip compression, and eventually installed perform the OAuth workflow with a concrete instance counting on the Google OAuth merchant to authenticate and authorize an app and users.
You will examine every thing you must eat RESTful net companies, authenticate your clients, and engage with their social systems profiles out of your Android app.
What you are going to examine from this book
* manage your Eclipse workspace to incorporate 3rd social gathering libraries (such as Spring for Android).
* take care of dependencies utilizing the Android Maven Plugin.
* Use m2e and its m2e-android connector to paintings with Maven dependent Android tasks in Eclipse.
* Create an app connecting to a RESTful internet carrier: utilizing JSON, XML, and Atom messages.
* Create an app connecting to a RESTful internet provider: developing, deleting, updating, and retrieving information to and from this service.
* permit HTTP BasicAuth and Gzip compression on your RESTful shopper app.
* Use the 3rd occasion library Android Annotations to simplify your RESTful app code.
* Create an app authenticating the Google OAuth merchant and permitting entry to the person uncomplicated and Google+ profiles.
Approach
Get to grips with a brand new know-how, comprehend what it really is and what it will probably do for you, after which get to paintings with crucial beneficial properties and projects. this can be a Starter which supplies you an creation to Spring for Android with lots of well-explained useful code examples.