Vagif Aghayev
Vagif Aghayev

Reputation: 411

How to connect web API to my app?

I am new to android development and I have no idea how to connect web API to my app in android studio. I have googled and I could not find any information. I have 3 labels and I should fill these labels with information that are given in api. Here is the link for API https://data.e-gov.az/en/services/details/695.

Upvotes: 0

Views: 141

Answers (3)

Uday Ramjiyani
Uday Ramjiyani

Reputation: 1447

Try volley library by google.

Checkout this link : enter link description here

add following line to your app's gradle file to get the volley library

  • compile 'com.android.volley:volley:1.0.0'

Check this for Sending a Simple Request

Upvotes: 0

Ankit Patidar
Ankit Patidar

Reputation: 2781

it's very easy but u have to try urself there is nothing which is impossible to find.

Here is link for your need JSON PARSIN Go with it. It go with step by step and let you teach how to fetch, parse and show data. Or else you will go with RETROFIT best library for Jain handling.

Happy coding. Let me know if need more thing

Upvotes: 0

Nero
Nero

Reputation: 1048

Hello mate and welcome to stack overflow. First let me tell you to please clarify your question for future reference because the people who are answering your questions do not wish to visit the website and see the type of API it is and what the response is like. You should provide an image or the response itself as it saves time. I did go on the link you provided and looked at the sample. The sample is a Json formatted response which means you need to add functionality to your application which will read that Json format.

Therefore, I would recommend you to use Retrofit library. Broadly speaking; you'll need to cover the following parts:- Pojo classes (for your JSON response), interface class (with the type of call and URL) and your class where you wish to download the data (rest of your retrofit code with your base URL). Do some research and follow tutorial. Implement some code and if not successful, you are welcome to ask again (but try to ask with code).

Upvotes: 2

Related Questions