Category : retrofit2

I want to make a spinner using retrofit 2, I successfully fetch my data and show it in spinner but when I try to show the selected option in textview it shows me blank here is my onResponse: @Override public void onResponse(Call<ListModel> call, Response<ListModel> response) { ListModel data = response.body(); if (data.getStatuscode().equals("100")) { category.clear(); for ..

Read more

i have setup some API data to display on my Android APP [ {"attendanceID":1,"userID":1,"date":"14 Apr","clock_in":"10:11","clock_out":"19:39","noted":"Weekday"}, {"attendanceID":2,"userID":1,"date":"15 Apr","clock_in":"23:09","clock_out":"N.A.","noted":"Weekday"}, {"attendanceID":3,"userID":1,"date":"16 Apr","clock_in":"19:19 ","clock_out":"19:42 ","noted":"Weekday"} ] my data model is this data class Attendance ( val userID: Int, val date: String?, val clock_in: String?, val clock_out: String?, val noted: String? ) the interface is this interface INodeJS { @GET("load_attendance") ..

Read more

How to post data in retrofit in the form of Json Android.Thanks in advance {"projectcode":"DAKWHR1200000","whcode":"WHNIM02","empcode":"OPS0889","lrno":"19999", "invoiceno":"INV1","pono":"PO1","flag":"GIT","serialinvoiceno":"999999", "poqty":"2","crossdoc":"","dflag":"", "pendingitems":"[{"itemcode":"DTF50RRV161" ,"gitqty":"2","docqty":"2" ,"phyqty":"2" ,"damageqty":"0" }]", "scanitems":"[{"itemcode":"DTF50RRV161" ,"serialno":"1234567890"},{"itemcode":"itemcode" ,"serialno":"1234567891"}]"} Source: Android..

Read more

i have a problem, that i can’t connect to retrofit with my code my back-end is working successfully with postman enter image description here MainActivity: enter image description here APIClient :enter image description here Interface UserService : enter image description here Source: Android..

Read more