bonsaiapplications-blog
bonsaiapplications-blog
Untitled
1 post
Don't wanna be here? Send us removal request.
bonsaiapplications-blog · 6 years ago
Text
How to use JSON Rest API in Android App
<uses-permission android:name="android.permission.INTERNET"/>After adding the dependency hit the sync button. We need internet permission as we will fetch the data from the internet. implementation 'com.google.android.material:material:1.2.0-alpha03'
Tumblr media
Hello guys, Today we are going to see how we can consume JSON API in Android or we can say consume REST API in Android. First, let's see what is REST API? According to restfullapi.net: REST is acronym for REpresentational State Transfer. It is architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation.REST is acronym for REpresentational State Transfer. It is architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation. So basically we can fetch data and create data on the server. Now let's make a working example on JSON API. First, we have to create a new project in the android studio if you already not created it. Our end result app will look like this.
Tumblr media
To make this UI, we are using android recyclerview and cardview. To use them we need to add the dependency to our project.
implementation 'com.google.android.material:material:1.2.0-alpha03'
After adding the dependency hit the sync button. We need internet permission as we will fetch the data from the internet.
<uses-permission android:name="android.permission.INTERNET"/>
To read full article click ==> JSON API in Android 
1 note · View note