Retrofit Tutorial - GET Request - Display Data In a Recyclerview - Android Studio Tutorial

preview_player
Показать описание
Android Retrofit Tutorial: Fetching JSON data from a rest API and displaying it in a mobile app using recyclerview.

For additional help/customization and tasks reach me via.

In this retrofit tutorial, I will show you how to consume rest API and display the data in a recyclerview.

I have created a rest API where we are going to fetch data from using Retrofit GET Request the display this data in a recyclerview.

Together with a retrofit, I have also used:
1. Gson to deserialize the retrofit response.
2. OkHttp interceptor to help log retrofit request and response.

Steps to creating Retrofit Get Request:
1. Add retrofit, Gson and OkHttp Interceptor dependency.
2. Create a Retrofit API Client.
3. Create a User Service.
4. Add the UserResponse Model.
5. Perform your request.

Thank you for watching.
Remember to subscribe of you are not subscribed.

Source code :
Рекомендации по теме
Комментарии
Автор

Thanks brother finally found what I wanted 🥳🥳

pawnstar_gaming
Автор

Audio is never very good but the content is spot on,
i had issues with login till i found ur video and realized i had no set the phonNo and password to th e model class b4 sending them.. so it was sending empty string.. thanks for the eye-opener...JUST SUBSCRIBED

ni_kabiu_john
Автор

Very helpful, exactly what I needed, thank you so much !

PunkMarg
Автор

how can I create my own rest api?please share a good tutorial on this..I badly need this

sabiha
Автор

Hi sir.. I'm getting the response from api but the list is not showing in my recyclerview.. only blank screen is showing. Can you please help

ItsMePP
Автор

hi i am using the same which you are saying in the tutorial but why every time is saying skipping layout where my layout is correctly initialized

merazahmed
Автор

THANK YOU SO SO SO SO SO SO SOOO MUCHHH!!!

maraya
Автор

when i run it all its ok but the thier is any data showing

smailbouzid
Автор

I appreciate it, Brother from my Heart, Thank you.

uNknownrMx
Автор

Hi, first of all, congratulations on the video. Really good !!! I would like to know the possibility of creating a video with the creation of an API on a local server.

rogerionqnq
Автор

Can you make the same thing even on Kotlin Language? Thanks

enoklitshtembari
Автор

Hi.. I need a small help. how can pass the parameter for this Callback method?

sutharshanratneswaran
Автор

Thanks for watching
Subscribe for more tutorials
For any clarification or question feel free to comment below.

larntech
Автор

There is no enqueue method. Could you please help? I have tried each retrofit version and checked all imports. Nothing seems wrong but i can't figure it out why this is happening.

Muhammed
Автор

did you use Api key anywhere. in this project..?

invisiblesmoke
Автор

E/failure: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $

PRIMITIVE
Автор

Hi, can you help me?
Only 1 user is displayed on the screen while the list returned by the API contains 2 users.

Let me know if you also need the code.

Thanks,
Alessio

alessiozubiani
Автор

The list of the users with button was designed By you or it came with the API? :)

RZX-
Автор

hello can this be use for real time projects

syedibrahim
Автор

E/failed: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $

md.ashiqulislamshajal