Android Networking: Beyond the Basics

Sep 8 2022 · Kotlin 1.7.10, Android 12, Android Studio Chipmunk

Part 1: Implement Advanced Retrofit

01. Introduction

Episode complete

Play next episode

About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Next episode: 02. Use Different Parsers
Transcript: 01. Introduction

There are so many wonderful things you can do with Retrofit, which is why this is a whole part dedicated just to those advanced concepts! :]

In this part, you’ll learn how to work with a parser for both Kotlin and Retrofit. You’ll also see how to use interceptors to add passive behavior to every single request, to avoid having to do it manually every single time you connect to the API.

Finally, you’ll explore the DELETE REST method, to fill in the core set of methods and functionality most servers these days use.

There are many parsers out there, and each is specific in the way it works, the functionality it holds, and its performance.

They also differ in terms of the syntax they use, to serialize data. You’ll explore a cool Kotlin-powered parser, called Kotlin Serialization, in the next episode!

Interceptors are mechanisms that you add to requests, that intercept every request and perform extra behavior before proceeding with it.

In this part, you’ll learn how to add logging interceptors, which print out information about requests for you to analyze, authentication interceptors, which add authorization tokens before each required request, and more.

Finally, you’ll implement one of the last requests in the API, with another REST method - DELETE. GET fetches data, POST sends it, and well, DELETE is used when you want to delete something. Makes sense right?

You’ll see that in Retrofit, it’s not much different from other requests, but when you’re reading the API, it will certainly help you understand what happens, without having to think about it too much! That’s a lot of useful and cool concepts to master, and without further ado, let’s get started! :]