Consuming RestFul service using okhttp in Android Fragment

Consuming RestFul service using okhttp in Android Fragment



I am developing an application that has 3 fragments that consume RESTFUL services each. I set static data first for all the 3 tabs for sample view and calling RESTFUL service in only the 2nd tab. I used okhttp to consume the service and fetch the data. I was able to get the JSON response < Parse it < set data to my textviews and displaying through recycler view. My issues are :


RESTFUL


okhttp


JSON


Recyclerview


onfailure


onresponse





Please add the MainActivityAdapter code with the question.
– Sunny
Aug 29 at 5:36


MainActivityAdapter









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.