Android Retrofit Tutorial || POST REQUEST || Insert data to database || Android Studio Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this come to this tutorial we will learn how to put that blow us up last times tutorial was out to get data from the South the mobile app so we are going to create user after you create user we are going to get a list of users that have been created using a different tab that we created in the previous building so when they create a user Etsy use an L learn check first name were still on last name check and email are still on track at gmail.com then I say register user user assumed successfully if I go to a previous application I should see a list of users including the one of just click that is banded so I have created an area here on a link in the description we see of tweezers and soon we have larger and her picture in our post here that augmented life and first post data augmented post user name first name last name email and even date then so let's get started I'll start by adding liquid so for length of the dependency when virtual trail to the website internal wind mr. trudeau dependency here the real test version is bit to it work in that I'm also going to add convert early brother I'm going to use this one diversion horses - each one has a and I'm also going to add HTTP longer interceptor but I can be able to load a request Anna very good word then single project I'm going to create a parent within the template Kyle went home private class a private method that is going to turn left let's rocket it is equal to mu net profit but building that big I'm going to return the trophy so I'm going to add converter Libre buddy listen converter fitori got create a masa winter party busy area according to at APL or busy Wireless AP romantic dotnet and I won't spoil our client so won't have HTTP log and acceptor gtp long intercept is equal to mu HTTP login interceptor HTTP Lord interceptor but set level and I'm going to go the body of get it good okay keep it clean make okay HTTP client dot building but I interceptor I'm going to allow HTTP element set and I'm going to build go into our plant I'm also going to treat it as a service which is within the sighs that's why I'm going to do my course you can see from the documentation you can do different call yet we can do it post the last we are going to do a quick post today so I'm going to hug them to create the usual question and a Miss a response so for user requests the last post to user data will cover the foreign language school we'll call the username we'll call the first name last name email and they said now I'm going to keep the dead zone is before then I will to generate the doesn't settle our user response when I create a user of getting the following last one sort of private entirely very extreme username first name last name email we cannot be that or now then I went to the net educators and sweaters and so what while is a service I'm going to do a post slab where I'm going to sleep users in the body that will pass this Israeli question so I'm going to have met Colin which is going to be responded user response and that a method should be seriousness from service upland a money-saving values so these are post and then a material L is users so we're glad and we have a public static use a service which it is a service so user service is a service is equal to get led to hit good create user service but class so I'm going to turn in the service then I went to my activity whereby I will travel let me create activity the Bondurant car won't have color primary I'm going to have upward much violent not content amusing questions on the top top of palette then I'm going to have my toolbar much violent attack actually were silent then we do need a Harvard experience long content lab content and the test would be user registry won't have car what I'm going Center will have a destroyed aspect of palette and end and of palette so I'm also going to do something here I'll have profile options from I am will have so as compatibility the Russian will help fashion 1/8 in dynamo and half target compatibility most weight have the one version in version one it let me say cancel then we alignment project as it is in story I will continue told how buddy new linear layout which is going to much financial up content I'm going to have an intuition vertical so as you can see in a user registration but we don't have any field here so I'm going to hover this zone and limited is only a block so this should be top bottom of out them and should we start state of pilot and end end of pallet let me give you this one zero because bottom of a talent a palette the color should be wait let's learn a project and see what we got and starting okay now let's proceed another text to help she's much violent she loved content and hold should be username and then style should be material she'll be outline then helping children text input nudism she'll be here yes in a diesel in Salem went have edited much pilots love content and I I'm going to give it reason with her top magazine ten let's load and say what we have installing a PJ yes we have all use on here so the second one should be fastener it is should be last now and this one should be a male then we need - here again I'm going to say but unlock button but register the text I'm going to say is an illustration so from whence it came so let's lines even are everything we need to pass this them so its story is we have my username your very first name last name and user email so use the registration let me give this a parting of 10 so you go to my main activity of edit text layout some windows username f name tag name and email a most beloved button laser so a user never will predict find liberating ungood i dilute username we have first name we have lost and help email we have bottomless register user lady for the button item register so lens user got set on click listener named them on click listener so when you click this button is when we are going to post data to the user so my plan include post request public is a request create request so it is a request in the request is equal to mu is a request see is requested set user name is an inductive effect data string we have user name we have set email where we have email we have set last one and of said first name then I'm going to return is a request so we'll get a retrofit post method total hot public void snail user and wind hard cold that is going to respond with the user response user response collie is accustomed he played client but until the service the same user and this method I'm going to pass is a request is a request let me put this so I'm going to my request we listen to the third one so if then the core buck we have one less person on fader so give less ones not is successful I'm going to do a toast dot webtext main activity is I'm going to swing the message sent successful just dot length long not sure the main quest is not successful I am going to say lift quest failed then have unfair then where the point is a request from the field of chain get localized message so that you know what has exaggerated so I'm going when you click the button I'm going to see abuser and then I'm with but how will quest use a request so that's all let's learn up and sit together so I'm going to have the username is easy just first mail is last meal test in order to have years of test at gmail.com remember to add permission before you post your visa we have internet permission so what is the meaning is opposed let's see so as you can see same successful so we have posted is that time we could end a test point of 0 1 and this is our last pass so we're going to see if exactly these users have just post in this tab so I'm going to go back or previous up virtual users yes we have our user user test so thank you guys for watching the next step is in the next tutorial will cover how we can do London register of my latest a user and login that years so you're not subscribed pneumatic subscribe
Info
Channel: larn tech
Views: 35,311
Rating: undefined out of 5
Keywords: retrofit android tutorial, android retrofit tutorial, retrofit, retrofit 2 tutorial, retrofit post request android example, retrofit post json, retrofit post method example in android, retrofit post, android retrofit post, retrofit tutorial android, android retrofit post json example, retrofit post rest api, android post request json, android post request, retrofit insert data, retrofit tutorial android studio, android studio retrofit tutorial, android studio retrofit login
Id: E8OXH0sMqEw
Channel Id: undefined
Length: 22min 7sec (1327 seconds)
Published: Mon Apr 20 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.