Android Networking: Fundamentals [SUBSCRIBER]

栏目: IT技术 · 发布时间: 5年前

Learn About HTTP & Threading

Introduction

2:43 Free

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

Install the required tools to open and work on the Taskie app, and explore the Android Studio project you'll work on. Android Studio 3.6 or greater installed.

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

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

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.

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

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

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

Conclusion

1:34

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.

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.

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

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

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

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

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

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

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

Conclusion

1:32

Go over everything you've learned in the second part! Introduce some advanced concepts like interceptors and other parsers from the third part.

Expand Upon Retrofit

Revise the concepts learned so far. Go over some of the repetitive tasks you had to complete with Retrofit, and how to solve them.

Implement a third way to parse data, which is light and supports multiplatform - Kotlin Serialization. Compare to other parsers.

Add logging interceptors to Retrofit's client, to log information to analyze each request. Implement a custom error handling mechanism.

Practice using HTTP logging interceptors and the Result error handling, by implementing more requests.

Learn about another way to use interceptors, to add authentication headers to requests. Explore the interceptor request chain.

Practice implementing more Retrofit requests, to add a DELETE method to the api service.

Conclusion

1:46

Go over all the cool concepts you've covered in the third part of the course. Prepare for the last part of the course, and Kotlin Coroutines!

Retrofit With Kotlin Coroutines

Get an introdution to Kotlin Coroutines and learn about how Retrofit has built in support. Discover why coroutines are a modern way of threading and networking.

Remove the Callback object from Retrofit, and wrap calls in Kotlin Coroutines to simplify the code and make it more understandable.

Simplify the coroutine-powered api calls even more, by implementing the built-in coroutines support in Retrofit.

To finish off the course, and practice learning about Kotlin Coroutines in Retrofit, simplify the rest of the calls!

Conclusion

2:08

Good job reaching the end of the course! :] Explore future courses and advanced topics in threading and networking.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

新媒体营销概论

新媒体营销概论

秋叶、刘勇 / 人民邮电出版社 / 2016-12-1 / 36.00

本书共分6章。第1章重点介绍了新媒体的概念和特征,引导读者全面认识新媒体所处的行业;第2章用历史发展的眼光,介绍了不同类型的新媒体,让读者不仅能看到最新的新媒体模式,也能看到这个模式发展背后的脉络;第3章重点介绍了新媒体广告投放载体,便于读者选择适合自己的新媒体运营方式;第4章介绍了新媒体运营的策划思维;第5章介绍了新媒体舆情管理知识;第6章选取了可口可乐、海底捞、恒大冰泉等的新媒体助力传统行业转......一起来看看 《新媒体营销概论》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具