Android Development: RetroFit

Android Development: RetroFit

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 59m | 426 MB

Web integration is one of the foundational pillars of a good mobile app. But it doesn’t mean you have to write a lot of code. Square offers a free, open-source library called RetroFit that makes integrating with a web API a breeze. This course explains how to use RetroFit to connect an Android app to the cloud. Instructor Jon-Luke West—an Android product engineer—reviews the basics of web communication with REST APIs and the methods for reading and writing data to the cloud. He shows how to define your data models and write API-related code for a sample project using popular packages like GSON. He also covers the configuration options that are available, such as customizing the data converter and serializing multipart HTTP requests.

Topics include:

  • REST API basics
  • Methods for reading and writing data
  • Defining data models with RetroFit
  • Implementing an API interface
  • Getting data with a RetroFit call
  • Authorizing requests
  • Putting, deleting, and posting data
  • Customizing the data converter
  • Working with the request and response headers
Table of Contents

Introduction
1 Android the web and Retrofit
2 What you should know

HTTP APIs
3 REST APIs
4 HTTP methods
5 Methods for reading
6 Methods for writing
7 Formats models and converters

Get Started with Retrofit
8 Review the sample project
9 Include required packages
10 Define data models
11 Implement an API interface
12 GET data with a Retrofit call
13 Handle failed requests
14 Use query parameters

Finish the Sample App
15 Manipulate the URL path
16 Make a HEAD request
17 Include a header
18 Authorize every request
19 PUT a star on a Gist
20 DELETE a star on a Gist
21 POST a comment
22 Test the sample app

More Configuration Options
23 Change the names of properties
24 Customize the data converter
25 Form URL encoding
26 Use a query header or field map
27 Make a multipart request
28 Use ProGuard with Retrofit

Conclusion
29 Next steps