Тёмный

Everything You Need To Know About Retrofit and Moshi in Android | Get Data from an API 

tutorialsEU - Android
Подписаться 3,2 тыс.
Просмотров 12 тыс.
50% 1

In this video, you will learn about Retrofit in Android
To become a great Android Developer check out our Android Learning Path: bit.ly/3l6vG86
Download our Android Developer guide here: page.tutorials...
This is a tutorial on how to get data from an API on your Android device. I will show you how to use Retrofit in order to make the request and parse the response.
Networking is a very important aspect of Android development. We often require to retrieve data or load images from a server to display on our application, this process is called networking.
To interact with data from the internet we need to make a request to the server, lets understand what a request is and what happens during the process.
There are two different parts to consider when making a request, the Client and the Server
A client can be any of your device's phone, tablet, laptop, or even a browser while the server can be any central computer or program that controls or provides the information that you need.
The client and server use the hypertext transfer protocol (HTTP) methods to communicate with each other. There are specific methods created to enable them to understand each other which includes:
@GET - The get method is for reading data from the server
@POST - The post method is to create or add data to a server
@PUT - The put method is to update an already existing data
@DELETE - The delete method is to remove an existing data
When the client makes any of these requests, the server processes it and reacts with a response. There are response codes that indicate the status of the request sent to the server.
100 - 1XX → This is an information response
200 - 2XX → This is a successful response
300 - 3XX → This is a redirection response
400 - 4XX → This is a client error
500 - 5XX → This is a server error
The most common response codes to encounter are *200* which is an *OK* response code meaning that your request was successful. *404* which is a *Not Found* error code meaning that the request sent by the client does not exist on the server. *503* is a *Service Unavailable* error code meaning that the server you are requesting information from is not available at the moment.
tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x

Опубликовано:

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@MrDorperezz
@MrDorperezz 2 года назад
Hey Denis, Thank you for making this tutorial,one **critical** thing I must mention. Those copy pastes didn't help at all ,especially if I am just learning how to use retrofit. It is confusing and its removing concentration. When I see you type it helps me think and my brain connects the written code to the task we are doing,however,when you copy paste I can't concentrate and its very hard to understand new subject like this. Thanks again for the lesson!
@eganathan.r
@eganathan.r 2 года назад
I would recommend you add Moshi to your title as well, I have been looking for this everywhere and none has the clarity you had on implementing retrofit and moshi. Thank you Denis
@tutorialsEU
@tutorialsEU 2 года назад
Thanks for the hint.
@Маша-н1ч6ш
@Маша-н1ч6ш 2 года назад
Great lesson! Thank you!
@ilyas1569
@ilyas1569 Год назад
You are life saver bro :)
@AndrewKochanov
@AndrewKochanov Год назад
Thank you Denis
@mysticmanish5002
@mysticmanish5002 3 года назад
hello sir, can you plz make a course on a advanced fitness app like app purchases is there in application and many more things........................like a app which is uploaded on play store whose name is workout from home application...sir plz make that video on that.
@kosisochukwuhillary9130
@kosisochukwuhillary9130 Год назад
Blast. Can we get the github link?
@gerardomedellin4355
@gerardomedellin4355 2 года назад
Thanks for this video, but i see that you do not get all the characters, can you show a way on how to access more page(more characters)?
@khuenguyen7960
@khuenguyen7960 3 года назад
You can make video about dagger-hilt, Google and Facebook login?
@tutorialsEUAndroid
@tutorialsEUAndroid 3 года назад
Great idea, thanks!
@heitorcarmosoares
@heitorcarmosoares 7 месяцев назад
Favor gerar legenda em Português.
@farshad462
@farshad462 2 года назад
I followed exact instructure but is doesn't work, can you attach the code file?
@sb-cr4wu
@sb-cr4wu 2 года назад
did you get it to work? Maybe you typed some code or dependencies wrong?
@farshad462
@farshad462 2 года назад
@@sb-cr4wu I had started another course which I hope it help me have a deep understanding about it
@sb-cr4wu
@sb-cr4wu 2 года назад
@@farshad462 OK. Let me know how it is. I am struggling to learn Kotlin, but this project was ok so if you want me to look at code I can
@farshad462
@farshad462 2 года назад
@@sb-cr4wu thanks for being kind, my problem was about understanding the instruction, my code was working fine , so this new course which I'm sticking with is almost solved my issue
@MichaelJohnson-ze6ql
@MichaelJohnson-ze6ql 2 года назад
@@sb-cr4wu I'm having issues where my text is displaying vertically instead of horizontally under the characters
@stasleonov5196
@stasleonov5196 Год назад
No, this is to many copy/paste, impossible look(((
@bilmiyorum06
@bilmiyorum06 2 года назад
I did not understand anything. Copy paste is hard to understand.
@muhmmadnabil4107
@muhmmadnabil4107 3 года назад
You can make new course about how to make a real project like amazon ,ebay ,facebook and netflix
@tutorialsEUAndroid
@tutorialsEUAndroid 3 года назад
Hi, it is a good idea!
@muhammadfarooq0
@muhammadfarooq0 2 года назад
The tutorial is good but copy paste is a bad practice and hard to understand.
@tutorialsEUAndroid
@tutorialsEUAndroid 2 года назад
Thanks for the feedback. I try to not copy paste too much, but sometimes it's just super boring to watch a guy type code for minutes on end.
@tutorialsEUAndroid
@tutorialsEUAndroid 2 года назад
Thanks for the feedback. I try to not copy paste too much, but sometimes it's just super boring to watch a guy type code for minutes on end.
@eganathan.r
@eganathan.r 2 года назад
He is just trying to save time and some people actually like it...
Далее
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
Women’s Celebrations + Men’s 😮‍💨
00:20
The Ultimate Retrofit Crash Course
34:49
Просмотров 94 тыс.
Retrofit Android Tutorial for Beginners with Kotlin
29:34
I Remade YouTube From Scratch Using Just Bash
17:51
Просмотров 29 тыс.
Parsing network request from Retrofit with Moshi
10:58
Getting started with Retrofit | android studio | java
12:56
If __name__ == "__main__" for Python Developers
8:47
Просмотров 406 тыс.
Android ViewBinding in 8 Minutes
8:59
Просмотров 77 тыс.
Women’s Celebrations + Men’s 😮‍💨
00:20