Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Android Development: Retrofit with Java

via LinkedIn Learning

Overview

Take your Android apps to the next level by connecting them to the cloud. Learn how to use the Retrofit library to integrate an Android app with a web API.

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.

Syllabus

Introduction
  • Android, the web, and Retrofit
  • What you should know
1. HTTP APIs
  • REST APIs
  • HTTP methods
  • Methods for reading
  • Methods for writing
  • Formats, models, and converters
2. Get Started with Retrofit
  • Review the sample project
  • Include required packages
  • Define data models
  • Implement an API interface
  • GET data with a Retrofit call
  • Handle failed requests
  • Use query parameters
3. Finish the Sample App
  • Manipulate the URL path
  • Make a HEAD request
  • Include a header
  • Authorize every request
  • PUT a star on a Gist
  • DELETE a star on a Gist
  • POST a comment
  • Test the sample app
4. More Configuration Options
  • Change the names of properties
  • Customize the data converter
  • Form URL encoding
  • Use a query, header, or field map
  • Make a multipart request
  • Use ProGuard with Retrofit
Conclusion
  • Next steps

Taught by

Jon-Luke West

Reviews

Start your review of Android Development: Retrofit with Java

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.