step 1:after create new project goto build.gradle
then add two dependency
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
Step 2: create json data and test to validate;now keep these api files own localhost mine like C:\wamp\www\ContctApp\name.php
echo these data in the php file.
Step 3: make pojo class using these data and give class name like Contact,now create java clss in android studio with this
name Contact;these known as model class.
Step 4:Create Retrofit instance create new java clss and name it ApiClient.
Step 5.Create interface method ApiInterface for your API call
Step 6.Now create custom adapter name is "NewAdapter"( in NewAdapter.java class create another class ViewHolder )and custom xml name it "name_list"
step 7: In MainActivity make request to parse JSON data
Step 8: goto Menifest and give internet permission....
Step 9: if your net connection is on then use your current ip address in BASE_URL
if you are in offline then use 10.0.2.2
To create model class link:http://www.jsonschema2pojo.org/
To validate JSON link:https://jsonlint.com/
My usage API link:https://www.dropbox.com/home/Apps/And...
Project link:https://www.dropbox.com/home/Apps/And...