API Integration in Android - Volley and Retrofit Libraries - Android Studio Tutorial in Hindi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] Interesting Video This is Sameer So guys, in today's video we are going to learn AP in its main, so basically till date you have got this concept, it seems very difficult, friend, what is AP, how do we learn AP? You can implement it in Android, but after today, after this video, you will not feel that AB is live like a toy, this is exactly the way I am trying to understand and you will also understand that this is my aunty, so in this video. Let's watch it completely, then let's start this interesting video. Welcome, you are new in Android up development and now we will become the champion of Android. First of all let's talk to you friend, what is AP and how can we add AP in our Android application. We can do that, first of all, let's see what is AP, what is AP, this is correct, but no one, what is AP is simple, let's understand this, so I have come for Apps Abhang, it is fine in my Chrome and give me here. I am coming to Google Play. Basically why I am coming here because here I want to show you such an application which we use on daily basis. So do you use it on daily basis or not? Tell me friend in the comment that yes I am like this, I came on Instagram, you see here is the home page of Instagram, then you all will know friend because you do it daily, don't you suggest Instagram, if I am here then below here. What was the second post? A caste means it would have been some other person, his photo comes, that is, the more I scroll, the more photos will keep coming, it is such a scene, so I am noticing one thing here, I must have thought one thing here, as many photos as there are. Where are these saree photos coming from? You must have thought that I am coming from the story, the more we scroll, the more we see the photos, the more we see the photos, then where are those photos from, then there is the answer. Brother , that photo is coming on data, so yes data means you also suggest that I have a box, I have kept it in the box, now whenever I need it, I take it out little by little from the box. I will take it like this, if you and I do the example, then what do we do? Different boys take supplements, go to the gym, take supplements, then go and keep a box of supplements and take it daily in the morning, that is, whenever we go to the gym. Keep taking one spoon each in the morning, it means there is relief kept in their box there, so the data that is ours keeps coming, keeps coming, relief comes, so hope, so now have you understood, where is our data ? So here comes another question, if the data is coming like we take supplements, then what do we do with it, do we do it with spoon or not, it does not mean that we put our hands and It doesn't happen like this, you do it with this phone, then like it, you can take the supplement, then it means there you are doing it to a mediator, they can sitter spoon, okay, so like this here. But there is also a leader whose name is AP. So, if everything is understood then the meaning of the box is that I have data in my database, now I am here in my application, now I have seen the data in my application, if I want to bring it then I With whose help can I bring it? If I can bring it with the help of AP, then friends must have understood that as if I am extracting the supplement, then I am doing it with the help of a spoon. Similarly, if I extract the data from it on the data, then I am using the AP. If I do it, then this much thing would have been clear, then please like it. Whatever data you will see here means as soon as I scroll down and scroll down to it, I will keep seeing more details. If it is about taking data , then you must have understood that if the data is coming from the data base to our application, then it is coming through AP and the opposite is also true if the data has to be taken from your app till the data is sent, like I am. Here , when I try to finalize the login paste, what happens in the lock-in is that the data is being lost, if you are chatting late, then you will know if you are chatting, I mean, the person who made it must have known. According to what are you talking about, because this cannot be possible, it is not an encrypted thing, in today's date, I do not feel that they are rapid, if you start talking to your friend, then share the shoes once. You will see on two Instagrams that you are seeing his ads all around. If there is such a scene then I can take your data. If someone seems like this but is not a butt seeker then there is such a scene here. How do I know what is happening because here I talked to my friend that brother, I am saying something good, so how did that thing of mine, what I wrote reach the database, if the data is stored then it reaches the database. If I had gone, it would have been through AP only, then Lok Sabha would have understood that if I have to insert data and send it to the database, then I will do it like this. If I have to get the data from the database and bring it into the application, then I too am here now. If I do it, then I hope so gas, you must have understood this much, AP is basically coming from the star, so you can call it career, it means relief, it washes here and there, it doesn't happen here, it means it reduces to bring release, simple. You must have understood the word so gas and now let's talk about what is basically a flower form. I have not yet told you that a flower form is an application program. I have already told you that yes, in what way it is reducing, so there is something in Android. The system is like this, basically, what do we want to do, I will show you basically, I will gate you in my Android application, so how to see, this is my application and as soon as I come, look at me, sir, this data is visible. Right, this sir data is visible. If you are not able to see it from here, then I come to the URL. As I came to the URL, then look at me here. So sir, the data that is visible, right, this data is visible. Basically I am in these data of I want to fetch and bring this data base, meaning because this is India A, my Indian data is complete from B, now I want to show this complete data in my own, so I will make it AP, so I hope that the thing must have been understood and cleared. So, how can we get all this data in our Android application? Look, here I have opened a notepad, as is my style of reading, if you are following me then you know. It would be that yes, Sameer sir, how does he study? In this type, like me, I divide your concept into steps so that you can remember your concept through the steps, so I am coming here for the first time. Like, before that, tell me one thing, dude, look, to do the AP tomorrow, we will do it, so here it means different companies, like mother lo and like, if I say, I have phones, then say different companies, at least one. It must mean that I also have a Samsung phone, now it is from that company, the functionality is almost from the same, so now the AP has only one head, that is, it is the same, but the AP also has more variety of colors, company like. You can say, here there are two types of major companies, FBI means different types, first is this and second is R&D, which is not included by Google, Google recommends it if you want to learn AP. You learn from the wall because it is happening to him the most, if you go to your company, you will do it now, then you will know the meaning of Android application Centro Fit, you can do it, meaning you can do it and the others or in today's video. What is Wallet ? What am I doing in the first step brother? First of all you have to add dependency brother. In the first step you have to add dependency. In the second step what am I saying? Add internet permission. This is a very important point because this is the most common mistake of students. So let me write, we have to add information in the Internet Permission in Manifesto, then you will know what we will do and in the fourth step, what am I doing like I am here in Hindu simple words so that you are not confused. I can write that, I will write something like this only so that your problem does not seem too complex to you, basically what I am doing in the 9 months of activity, that is why I am not telling you the rest, when I go to court, I will tell you each and every thing. I will try to explain . If you know the using wallet then we will keep the same, then we will follow the steps exactly by doing this step, which is the dependency, then I will come here and will write here, write something like Android Quarterly Dependent, write the dependency like this, okay, you will search. You can find this website here on any website and here you will drag it a little, you can see here that we have got the dependency of that one, so we are not concerned with the one below, this is Picasso, the second library is this next one. in the video You must be watching in this video, if I need this dependency, then I will copy it and see whether my project is built or not, otherwise it is already done, you can see that there is absolutely nothing here, it is Hello World, I am This is called that brother, I have copied the dependency from Google and where will I come, in the calendar, in the greater build, here in the modal, and give it a Dr. and add your dependency here in this manner and this little format is correct. If not, then I will correct its format in some way like this, put here what has happened to them, above, they are different, then you will do it in this way and then click on sync and give dog ok gas, the first step is clear. Sync has been done, we are adding this in the second step, I am saying add internet permission brother, it is very important, sir, you have done the code, if you do not add internet permission, then your code will not work, that is why here you are adding it. I will write the users permission, I will open the tag and enter something like this and I will keep the internet here, so see, this is what you need, I said, yes, this is what you need, if you create the frog last, then what would this be? To do this, it means that the supplement is at the place, it is kept here, in which box can I say, there is a container, so to hall it, in the same way, to hall the data that we have, here we need a model class. Does it fall or does it definitely fall in the data class? Model and data are the same thing where we were talking about the model class and the data class we are talking about in another quarterly is less than the butt, which means that Hall is fine with the data because the data is There should be some class to hall the data, so we create it or call it model class or data class, we create this class because we get the data halled and from this data we create our class here. In Up, you can also share data on stories in your activities, so how do you create it, the concept of creating it is a little different, I come here on my AP, my UPI is on my browser, so I come here. So my whole thing is Control N Control C means the whole thing, I am selecting it and copying it and a little bit here, easy, we will play smart, how can we do smart, I will come here, I will give more in the files here on up. I will come basically on up and come in new, there used to be a plugin here but I don't have it installed yet, so I will install the plugin, basically will the plugin come in, will I come in the settings in the files, that is my entire Jason port, basically GM format. What happens is that we are seeing here, this is Jason format, just like HTML format was HTML code, if there was code then it is called Jason, Jason is basically a carrier, it carries data from here to there, so it is a relief to convert it. When in objects, basically I come to settings and give, here I will come to packing, see this one which is a fast extension, I will click on install, okay then I come to price package, gas, then new, then recording, I click in this way, so like If I click on it, then look at the user info here. There is a user ID info item here. Inside this, our entire class has been created, so we did not even have to create it, so if we created it automatically, then this is a beneficial thing for you. It is possible to do this in my comment, I will definitely recommend this plugin. So here it is done, I have created two classes and let us give cat to both these classes. In these two classes, we have only one and only. Data is going to come and nothing else, hall means link of those class thoughts IT now comes here basically now here is the most important less because if I talk about my step then we have done three steps and let us have this last step basically Why did I write here, let me talk about it in detail, first of all we create some variables URL and equal you and here I will put the photos and here the URL is our AP so I come here and this one is not my URL here. I have hit it, I will copy it i.e. I will paste it here, this is my URL and here we will create some more variables, well user info items equal you are list of something like this user info items ok so here I have this code I have done something wrong, we will come here and give it here, we will give it in its type, dates, it is ok, something like this and we have created this item type and give it, we will also have to create user information key for this. I will come up with the meaning of object class, here I set the class [Music] Net in this way and now look at the way in which we do it, so basically how does it reduce the string request and you are doing it in the format of K, which means like That we have a request, why does I take it like this? Because I have the inner sense to tell you, otherwise it is not a line, otherwise it takes the request in a line, like here, mother, take five A, this is my request, so this is the line. I will put this, then this after that, then this after that, then this after this, then this, this behind this, this is how it went, then I wrote the request, then again I will write the string request here and open the bracket, then the first match here will be my URL. Dega is saying that after seeing my comma, like there is response here, then I will try to write response by writing R capital, I wrote response, gas and give dot, I think listen, so I did this, listen, this has already come, I will press enter. This is something like this, give OK and then I come here, look here, put Komal here, then I will write again, if I put a dot like Respond, then here it will go errorless, then I will implement both of them, that's it, these are the two methods, that is, these are the two methods. Means here I created a string request, having a variable named well, string request type of history can be called 'apn' and here along with it there are two methods, one will be success or one will be failure, that is, I have created both the methods. Here it is made simply, if our app is accessible, then the data will come here in the success area. If we have some problems in this area, then it will go in this error area. Okay, something like this and coming here. Let's see what we do, so guys, before coding here, there is a library and builder, basically it will convert, so I will come here and will add more to this library, this library, if you write builder, you will get it easily on the internet, so I From here I will click on sync no and it will become lion, so basically what will the liability do? It converts it, meaning as I told you, it is GM format, we cannot show the Jason format directly, so what we have shown in the object. The one who will convert, the Zee Channel Library will convert, that is, if you can understand it like this, then I have to come here and write, let me create a variable. First of all, here Kisan will be builder, this is basically who builder is equal to you, Jis builder ji son builder, something. In this way and here it will say something like this to import library and if you press enter then it will be imported. Now I come here I will create another variable which will be my where ji dusky ok equal tu my ji sun builder . .com, you have to write this and give OK, here I press like control alt and L, the line becomes a small line, it gets set automatically, it gets formatted, now I come here and I run a gas loop here. Well, basically this is the loop, what I did here is that first of all it is converted, this is the code of convert, okay and give it, here the user is on input out, I ran the loop, whatever data is there in it means there is data inside it, right? Inside this class, I come here by pressing control A and let's come inside this class, this is the class, that is, here you will see this is the head data, this is the head data, we will get it, then that data will come inside it, then I will loop. Through that sir data inside this I will keep adding inside like user info and I will come here and now I am printing it through toast dot make test I will write here country is not equal you and give it here I I can write let it be okay, there was this code and give it, I will come to the error page, if it comes to the error, then what should I do, if you go back a bit in time, then come here, something [music] prints something like this [Music] Welcome so guys here we go, let's run this once and give the output, let's see what comes out and hope so gas you understand the code, what am I saying so basically what it does is It is done in some way, I told you that basically our URL is first we create a string request, we get two methods in the screen vocational, we can use two, one gets success, one gets failure, if we get success then Our data will be lost if there is a failure then we will be in the failure. Let's print the error, dates it and what is the third thing, we are relieved to make one which we have made below, here you can see and give wallet dot new request and give something in this way, hopefully you understand. What am I trying to say, once we see the output in this way and weigh the output, you can see the gas as if we have run up, if you do n't see it then it doesn't matter, this was our project, using the quote. So this is the one using get data and this little bit, we look at the torch to see what comes up, then let it build, then let's see whether our data is fetched or not, then you can see that you are running. Yes, the airport is visible to us, it means we are in the senses and whatever our data is, then this is good news for you, Congress. If you have done this much, then you will get these D senses. I came to know how you can capture this data and in the next video, I am putting it in the recycle view in the format which we scroll on Instagram, so I am doing that in the next video. That's all I mean in the video , oh so my target to you was that you must have understood how to access data from AP and database , you must have understood what a wallet is . Music] Champion of Android [Music] So guys welcome back you interesting video in today's video we are going to watch AP Part 2 so basically we had seen in the previous video that how can we get the date off from you Using Wallet Library So I told you in the last video that we have shown it in the empty toast message also but how can we show it in a recycler which as I told you you swipe right as if I am using the LED. You see, I come here and I come here again on Google Play and you must have seen many applications like Instagram, Facebook, there are many more and all of mine are late, I am an example of Facebook and in Facebook you will know in what ways we Let's do the problem like this is our home page, now as you see there is an image below that there is caste, then below that there is a third image, that is, the show keeps going on, keeps going on, so in this way, this In the format, you are given an image, which is someone else's text, how can you keep the data in this format, without recycling, we are going to do that in this video today, let's start this interesting video, so gas. Let me show you what we are going to do basically in the beginning, so basically this is our ABI, in this way we will be fetching our data, as I see it, it is a scroll label in a very good way, all our data which is If it is visible as fetched, then we must be going to do something in this manner. So look, this was my previous project, which I had done less than in the previous project, we had messaged a toast, then we had shown everything, now brother has come and talked. You will know about its recycled beauty in Observe Recycler View because I have already made a video on it. Okay, so what do I do? First of all, I have removed this torch message from here which was visible as mine, now we are in Toast. You will not show it, we will show it in the format of image and like n with text, so friend , there are two steps for that, the first step is that we will have to make like one, we will have to make it single, only five it in the file, I will format it as an image. And below that text, show sir data in this format, which is what I have done here for this, first I have created an image, then created tax, then in this format I am showing sir data, I have to do something in this manner, so for that If I create a file, then I come to the project, then I come to the race folder, I come to the layout and after writing it, I come to the new page and I create the layout in source, so here I give its name from Let to Single Ra Capital. If I can't give it, I give it in small, single rate, give something and give, you can give anything, here I lay out the liner layout of the quota, and if I click on give OK, then this is For me, a single will be created in this way and now I have to do its coaching here, here, here, in this way, I will do it in coding, so gas, I came here and I copied that code first. I have taken it, I am simply pasting it here, why am I doing this, friend? There is also an image and a tax here, so I have not done anything big, it is a very common thing, you will know the basic thing, if you don't know, I will explain, don't worry, if they know, forward it to others, see here. First, I have taken the orientation because of this and give it, here I have taken a text view in seconds, image view and give just text, you should see the data in this format of mine, for that I have created it, okay, so this is our less first step, give second step, let us We have to create a tractor class because we know that if we are doing recycler view then we will not have a pea class one, so before that we have not done the recycler view here, neither I am in it because I come in the option and here. But after flying this Hello World and here I have recycle fuel late, so here which out have I closed and inside this I will take recycle exactly and here I also change the layout, then there will be a change in making it constant. I am late in taking the liner and if it is not changed from the bottom, then let's change it from the bottom also. Take the liner in this way, it is okay, there is something wrong here, so the speech here has come in a very good way and you know. Have taken the liner out, now I give it to the recycler here, then I try to use America's resize filler view and here this second one has come here, inter match and match parent should be shown on the whole, brother and just give you its ID. So ID Android ID ID give anything but give rep now recycling view like this ok so you can give anything this is my recyclep now I have to create adapter class so I come to the project and give this our previous Time that we had created, so model class, activity class, I click on this package on this page, I have done normal right click, now I am left click and will come to new page and will come here, after coming here, I give you anything. You can give, here I have to select the class only, I will just click on the center, then as soon as I type the message, it will create a class for me whose name is Adapter, so basically here I am reducing it again, so gas here I am What do I do? Now here I put one of these and tell the variable well contact some methods. Now I will come here and add these, this has already been done and give it a type, I will give a class whose name will be view folder is glass, basically so I am alt. If I enter then this error will go through, then let's take it to our class immediately, do this pay view holder and see which way, so gas one, I entered the class, view order, item and recycle bin in it, passed all this, I will come here which will be on the director. I will click here, it says implement number, I will click on it again and after selecting all these methods, I will click on OK, like when I am done, all my methods are here, so here is what I created . There is a class, take it down, here I am, something went like this, okay, so basically what happened here, now understand what happened to me, here I created a class, typed the name on the error and give two paras here. I have given a contact of parameters, I have user info variable, various types of user info, which is my class and I have given it the name recycler foo dot adapter recycler view and this is one of my inner clothes by the name of, so whoever did the recycle of view. If yes, then they will know that yes, what is this code found here, what is happening, if no, okay friend, that video, then I will recommend the latest one, first watch the recycle video, friend, it has a very good concept, okay, then I will create a variable of my own . Account text, then coming out from here, I will write dot and give it here, basically whom brother, what have I created, what have I created, see, I have created something by doing signal, I must have created something, not in activity, single, which I told you should see my data in this format. That means here I will pass the fourth test, you are root like this, we made a mistake here, here we had to write parent also, so we pass parent and give ats tu rules, this is something like this, if you get an error, then here Here I will write return which was my view holder, view basically inside this, basically I have created a class below, you will remember the view holder, then I will copy the name of this class and after returning it here, what will I put inside it, I will put my view. Dates IT OK and if I press Alt Control, then my line will be formatted, whatever was here, then it is formatted here, basically here. We have done this code here, basically the meaning of camera is that I have taken out, set it so much that you can understand, now where do the items come here, return here, so here I will return user info. Dot size has become less, this method is over, now let's come to the folder in the holder, before coming to the holder, where will we come? Here, we will have to create variables, we have to set some references, so what do we do with our variables for reference? Let's make one image equal, you cannot do it like this here, here comes the item for you, you will put u dot dot, then the option will come, can't you do it directly like this, then I will give it here, now this is the type of image view, so give image view and R. If I want to write like dot id dot, then I have got the image view which is where it is coming from, I am holding control press and click on it, see where I am coming from, I am coming from my single row file. So this should be the control, in the beginning, where is my data, where is my data, in the model class, in the data class, which is mine, then from there I will set it in both of them, then I will set it on wind, meaning adding here. Here I will add gas, here one more thing I would like to tell you, like we patch the image, we do it as our own, if we use third party library image search, then we call it our own, Glide, there is Glide and there is Picasso too. For Glide, I will come here, I will write Glide Dependency, I will go here and here basically what is the use of Glide, it helps us in catching the image which we have from the internet or our eBay, we cannot do it directly like this, so I By scrolling here, I will copy the glide dependency here, I also need the image, I have not shown the image, so if you search the image then you will definitely need it from the library, I will come in the video and go down here and write the meaning here. But if I paste it , I can do the image through this library, okay if I do, then you can see that it has been loaded, that is, I have to tell with whom to vote, so here I have to write the user information, basically, I have to set it. Dot gate is fine, inside this I will pass the position which I am getting, inside this then coming out of the position, I will write dot and what do I want, I want avatar Yuva Ray means photo is needed because I am fetching the photo through glide library. I came here, I selected the avatar, you bill, where to do it, where to show it, brother, I have to show the holder dot in my image view which I have just created below, the variable is simple, okay, so I will try to write the name of my variable, okay phase. I am not doing it automatically, so the error will go something like this, okay, so this is our code, so basically what I did here, understand that I loaded Glide with Contacts, this is such a cream, I know that yes, it is my I will get the urn, whatever I want and give it here in the tax, I am patching the tax of locking, I am simply doing this much, I will come more in activity dot cut, so first of all what will I do is gas, what will I do with my recycler? View I will fetch what I had taken, so I am late for one and recycled. Recycle of you equal you find view by ID and type of recycled view and you know all these staplers that I gave Ram, now I will come here. Now here I have to create an object of adapter class of my class so I will write well and actor equal tu here I will write its name here I will pass two parameters which is correct contacts of this and second user view which I had taken recycle review dot Layout Manager Note: Okay, here you have done this, this code will remain here , okay, here you dish it, simply talk about current contacts here and here the gas is another one, if you do not set it, then set it. Will recycle review dot I have to write adapter = adapter we made available, we just had to code this much, it will start reducing our code from this much code in a very nice way, so what happened here, I created an object of class this By name and after that, I told the type of my recycle and view, brother, in which format and in which layout, I should show the data, then bring the liner and give it, I have set it, so man, we will do all this in liner aloud. The device is already done, our court has been completed and the name of our class is Doctor, in this manner, OK and give gas to us. Sure donation is done now I run my program and we see the output what comes and hope so gas you must have understood basically what I did I did two steps here and it is nothing big first step I created dot sml file In which I mean we create it in the recycle method, it is the same thing, so in the dot. What is going on? Gas OK and our up has been run and the output is look at the text and also see our images. You can see the name of the project. If I do the problem correctly then I can see the complete details, you have understood this much, friend, this is a big thing, but you also have to do it, friend, in what way I am doing it in the code, basically you have to understand each code one by one and if you give it, then of course you will do it, my friend. And people and the assignment for you is this, do it, then after that you have to tell me, this is a big thing, it is not a small thing to show the apps in interactive and if I tell you one good thing, this is how it happens in the industry, we This means that mostly this level is decreasing, if you do this, then you have got a little bit of this sense of where I can stand in the industry and I can also write code, this much you After this, I will become after this video [Music] So once welcome back no d interesting video today we are going to learn about d writer of it so friend you will tell what is retrofit so as you would know that you have seen the previous video I had seen that in the previous section, so basically what is a wallet and how can we do it? Like Toli, I had also given a hint in this that like a bid, another library has come in the name of which is Raid of IT and that. It is very much interesting, it is getting S compared to your body. If I say, if you go to the company and there you have the choice of doing one piece of unlimited K, whatever you want to do or I am inserting game data, everything, then you are also there. Like you are recommended, they will say this to you and will also force you, if you don't come then learn it, then before that I will teach you in advance today, the pressure will be completely different on you, so friend, if this is the thing then we will see in this video. Through that, how can we get any data like we can? Let's start the interesting video. Welcome, you are the champion of new Android, so gas and first of all I come to one of my MPT projects like this. You can see that it is definitely MPT here, there is not even Hello World, I removed it, OK call and give it, now let's talk girl, what are we going to do, meaning, first of all, as you would know , I fall in the right direction. My steps are basically, I divide the concept of the entire video into steps so that you can remember the steps and through that you can remember the entire video which is the conclusion. Ok then see friend what to say in the first step. I am talking about Dependency of Profit, I am saying that brother, there is a library which has a body through which you can do whatever you want tomorrow and let me talk about the second step, what will have to be done in the second step that you will have to create it. Do you know that there is data class which hall our data, so if we have to hall the data in app detail in data class, okay so you must be understanding this much and in the third step I am saying brother create an interface. Ok, these steps are added to it, if you do it after that, what did you do in the volume, what was the dependency, created the food data plane and give it, I did it yesterday in the activity, request and wallet NK, let's go friends. If you remember, there is a step here which is called, I am saying that you will have to create the interface, the interface is also its interface class, so basically I have reduced it, what will be there in it and we mention the point here and second think if our Light, if we want to insert data, then whatever parameter is there in our database, that parameter is like user's details, power is like not details, user's name is name parameter, email parameter is phone number, inside this, I am also in this field activity. You can do it, but you will make a separate one because all the things will remain separate, so these things will be correct, I think, and the rest here in activity, I simply write in activity dot kd for now. I write the code in activity dot cts OK, so that there is no confusion in this, that is why I am writing this and what will we do in my activity, for that surprise, you will have to stay for more, only then you will know that I am a YouTuber, I have done the most First of all, I am saying, Google will do the dependency, look at Retro Fit Android, I will do the dependency , you can write the latest version here, but for now, what do I do, so gas here, as I said, you will get the dependency from the internet, I have given the dependency which I have copied it and I will come here in the radial script in build.org. After coming here, I will simply paste whatever dependencies I had copied, so here you can see that there are two dependencies and one dependency has come into the community. Secondly, what is coming now, what is this, Kisan is basically a converter, that is, it converts our Jason into an object, that is, my data will be in the format of Jason and will not be converted into its direct Android. It is not shown that we have to convert, so we do not need a converter, it has been done, there are many converters available, it is given but it is like this, then after that you know, I have added these two dependencies, I will click on sync no. So this will give you some time, its library will import it and let us move towards our steps, brother, we have done the first step, now let's talk about the second step, create data class, so data class, did we also see it in the previous video? It happens and if we look here also, you can see the gas here, which we will phase right now, basically we will also phase this one, here you can see this data, you will have this much data, so our you are this. So basically this is ours also, so what will you do, what did I do that this is my data which is shown to you, will you get it, that is, the company people will say that this is the response, so I am copying this entire response to you here, okay. Whatever I see, I hit it on the internet and whatever I see, I copy it, so now I will come to my project, so after coming here, there is a smart way here, that means what I am saying now. Now to create this basically create data glass, so basically what is the first option is that you create it manually which we did in the last video, here a smart way is that I will come to the files and give it to the settings. After coming in, I am telling you the smart ways, after coming to the settings, you will see an option here, basically you are looking for plugins, it is in the market place and give it, you have to search here and this is Santu Katrin, I think I told you this earlier. You have to stone it and restart it. Once the ID is here, there will be an option automatically. Then if you do this, then what you do is, I will come here for a minute, yes, I will come here , then right click on it. Let's go to new page, automatically I will see an additional option: 'Cotline data class data class file from' Yes ​​Sir and here I will paste my Jason and give the name of the class here, which I will name. I am late, I am giving 4 lists like this, for now and click on the internet, like I click on generate, then this will automatically create my data class, so look here, it does not have two data classes by the name of court list. And give second step will be done, from the name of the result, you are seeing how much we have reduced, so these are some smart ways, you should do it, then the second step is also done, now I am saying that this create interface will create the interface class . Again we will come here right click new and give us we will come to class and finance and give the name of the interface so for now I will give me interface ok and give we will click on this here which is the third one because white force was selected on the class. So I went to the interface, will you basically do the interface? Now let's look at it in detail, so here the first thing we do is we mention our AP and point, then I will write Aate D rate gate because we are gate data. I wrote the gate and I will open the braces and give here I come here what is my one more point look and there is another point so I will just mention it inside this so I will do like this and I will write something like this in this way we will make a furniture Here we will tell you something like this and here what we will do is gas, here I am collared. Simply write the response here and give it and here I will give the gas that is its IPO, the court list which was mine, there I had created Court Lesbian, okay in this way, now it will give an error because we will reduce this one as well. We will have to suspend, basically we will give it background and then I have created a function which is named Get Photos and what is typed in it is my port list, simply this is what I have done, I have descended and not reduced anything else, now let's come to my steps. Look at this, our thought step has also been completed and let us come to builder class, so basically we do this, so I will come here, project, I will come here, right click, new and give, I have to write here for you, retreat builder like this and give, I I will enter because basically you are creating a class here, object to it, basically give more mention here, let us mention our AP first, where you are my ringtone because you know, if you are forced by Aadhaar, then I will copy my whole here, I have copied the whole. Kiya but I am the last one here and because of the point, take care of this thing, after coming here, you have to do basically, so gas, here we will create a function, function get instance, okay, simply the functions that come, type of, whatever its type will be, retro. Fat will be OK and give it here I open it and give gas here we will return simply see what has to be returned look retreat builder dot base URL basically we do not have URL so gas is my base URL and give it Inside, which I had created above, date seat, now I come below, ignore the error because here I will write dot, dot, look at this one Converter Factory and give it, inside this I will write dot create something like this and Ben which is second, dot simply. Here I will take the bill which was coming here, Thoughts IT, now our iron is also gone, simply tell me a function I did here, first of all I removed it from here, I am giving the pass of my AP to those who can become AP retrofit builder. After that, I converted it and learned whatever response I had given, not the response in Jason, but converted it into Java object. Here, I have explained everything in these two lines, you can understand it, now let's come to the activity. Dot KTM Because we have also done our fourth step, now here I have written the code, so basically what we will do here is that, let's see, so here we first increase a variable, well Bharat AP and make it equal to you inside. Retro Fit, the name of our class, which was the name of our class, Nitro Friend Builder dot, which function did we tell get distance and give, then after that I will write dot create here and then after that gas and I will write the name of my interface, so my interface. The name of the interface was 'me interface kal' and 'colon class.com' this think ok, I basically wrote this in one line and inside it the sign value 'a' will go, so here it is gas. As you know, the function I had created in my interface was basically in that. What all is suspended, so we knew it in that, we had read in the qualities that we can launch them through routine only after suspense first, so whether I should write or global isko dot launch ok, give it in this manner and here I am a I create a variable with the name of ware and rest. Okay, so gas, here I have created a variable, give the name of my variable, inside it, get photos from where and you know from where brother, because from our interface class, we have created it there. Now let's see the value inside my saree, we can print it, so how can we print it? Here first, you can also put a condition and if you put the condition before printing, then I have to write my result note equal tu null. If there is no tap then what do I do, don't I print it in love, then I am late, in this way I pass the spring here, I will get the result printed late, dot body note, you give Sarita district permission, because internet permission is not given. So friend, then how will this gate be done ? So, users permission and internet. Now I run my up and we see that our output will be absolutely correct. What we have done will be shown here tomorrow. If You will not even know, friend, who learned how to do AP, do you know how important it is to do it tomorrow, that is, it is a very important thing, friend, it is becoming less interesting, so if you had learned this thing, then you can say that yes, I am in the company. Journal hai thod ho too clear ho jaati hai to tu yaar ek bar m build hota hai I copy the result here and the result comes in the locket. So as I wrote, you can see all the different data that I had, it is visible here. Okay, all that was visible is fine if I try to show you. So see here also, whatever was written, Michael Jordan Time, means it would be written here also, if I search 9000, see, it is visible now, I mean, the complete data, if I zoom, you can see it properly. It must have been okay, so friend, we have learned to achieve success, so friend, for this, remember the first step, so friend, these are the five steps, basically I am revising, it is not a big thing, friend, I have made it a referee but something . Don't you see how easy it is, first of all we added the dependency, then not in the model class, that is, not in the data class, then we have created the interface. Why have we created the interface? Do you know that there we mention only one more point. And then we did it in a ref class. In this class, basically we mentioned the AP and whatever data we are getting, converted it, created text and given the last step, so what we did simply is that we created another variable. What we did in this variable was that we wrote the name of the interface class and stored a single variable in it. Now in this variable, I had created this function Get Photos, in the interface all my data is stored in it , that is one thing for you and I have given you one thing. If you understand the line then like the video and subscribe the channel.
Info
Channel: Neat Roots
Views: 13,483
Rating: undefined out of 5
Keywords: retrofit library, api integration tutorial, android libraries, api integration in android, android studio tutorial for beginners, retrofit android example tutorial, retrofit android studio tutorial, retrofit android, android volley library tutorial, adding android volley dependency, android fake api, learn android programming hindi, volley vs retrofit library, which one is better from volley and retrofit, how to use retrofit library, android development full course in hindi
Id: xRUq9jKnutU
Channel Id: undefined
Length: 55min 23sec (3323 seconds)
Published: Thu Jul 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.