This is part of the "Android Data and Networking" learning path. View Path

Android Networking: Fundamentals

Sep 6 2022 · Video Course (1 hr, 33 mins) · Beginner

Learn about the the HTTP, JSON, REST and all the other cool and important abbreviations in the world of networking!

Implement the Retrofit library in Android, add interceptors, parsers, and Kotlin Coroutines.

Version

  • Kotlin 1.6, Android 12, Android Studio Chipmunk | 2021.2.1 Patch 1

Learn About HTTP & Threading

Introduction

3:20 Free

Learn about all the concepts you’ll cover in this course, such as REST, JSON, HTTP, Retrofit, Coroutines and more!

1

Set Up the Project

2:39 Free

Install the required tools to open and work on the Taskie app, and explore the Android Studio project you’ll work on.

2

Add the required permissions to the Android Manifest file, and implement a way to check if the device is connected to the Internet.

3

Learn how to create an HTTP connection, and how to send and receive data using streams. Add timeouts and headers, receive data as JSON.

4

Learn what JSON is. Use the native mechanism of JSONObjects to parse the response from a new request - login. Extract data from JSON using keys.

5

Create another HTTP request using the HttpURLConnection, to practice your skills. Parse the JSON and connect the response to the UI.

6

Learn about JSON structures and how they correlate to Kotlin code. Use the Gson parser for automatic parsing.

7

Create another request with the HttpURLConnection, as practice, and use what you’ve learned so far to parse the data from JSON.

8

Conclusion

1:33

Revise the concepts learned in the first part of the course, and how some things were repetitive. Have a sneek peak at the next part of the course.

9

Implement Retrofit Basics

Revise the concepts you’ve learned in the first part of the course. Learn about Retrofit and the components that make it up.

10

Build the OkHttpClient, Retrofit and the RemoteApiService instance, to prepare everything for API call implementation.

11

Use Retrofit and its annotations, to implement an API request in the api service. Learn about the Call and Callback types in Retrofit.

12

Use Retrofit to implement a GET call, to fetch data from the API, and display it in the app. Compare the approach to HttpURLConnections.

13

Practice using Retrofit and its annotations, to implement a new API call. Practice parsing the response body.

14

Introduce the Query annotation, to send query parameters to the server. Learn about query URL segments. Implement a second call.

15

After using the Gson parser manually, learn how to use the Moshi parser to automatically parse the request and response bodies.

16

Repeat and practice what you’ve learned about the Moshi parser, and implement another request in which you’ll parse data using Moshi.

17

Conclusion

1:31

Go over everything you’ve learned in the second part!

18

Next course in this Learning Path

Version history

Android 12, Kotlin 1.6, Android Studio Chipmunk | 2021.2.1 Patch 1 (Selected)

Sep 6 2022

Android 10, Kotlin 1.3, Android Studio 3.6

Jun 16 2020

Android 4.4+, Kotlin 1.2, Studio 3.0.1

Mar 28 2018

Who is this for?

This course is for beginner Android developers that want to learn how to use all the Networking capabilities the platform provides, using things like HTTP connections and the Retrofit library.

Covered concepts

  • HTTP - HyperText Transfer Protocol
  • Threading basics
  • JSON - JavaScript Object Notation
  • REST - Representational State Transfer
  • HttpURLConnection
  • Parsers & Data parsing
  • Gson Parser
  • Retrofit & REST methods
  • OkHttp
  • Queries
  • Moshi Parser

Contributors

Comments