I learned to send an image of the drawable folder to my server on the network using lib Retrofit, but I am not able to send a ImageView the camera. I create a class that converts the drawable image to bytes , which it will get from...
Well, I'm starting to study Android, I even made an application with Volley but a friend indicated Retrofit because it was much faster and "simple". But I still can not understand much.
I have a WebService where I want to log in. I have to se...
For API testing purposes, I need to read json files that would be my responses in API requests.
Well, with Retrofit 1.9 it was possible to implement a "Client" and override the "execute ()" method to read the json file locally.
With Retrof...
I have an application Android , using the Retrofit library to handle requests , when trying to make any request on a android 5.0 or lower, I get the following log :
I / call: java.security.cert.CertPa...
I got Retrofit the Drivers field from the following json:
{
"Drivers": [
{
"DriverID": 0,
"Latitude": -23.642276336,
"Longitude": -46.634615118
},
{
"DriverID": 1,
"Latitude": -23.64227916,
"Lo...
Talk to me, I'm using Retrofit 2 and I'm not able to send JSON to WS.
I have my class here that sets json the way I need it:
CustomGsonAdapter
public class CustomGsonAdapter {
public static class UserAdapter implements JsonSerializer&l...
I would like to know how to ignore an attribute of a model in a POST request with Retrofit. In GET requests I want to bring all attributes, but in requests POST I need to send the object without id for example.
Sam...
I have the following object:
{
codigo : "1",
nome : "Carlos"
}
Java class (POJO)
public class usuario{
@SerializedName("codigo")
private int codigo;
@SerializedName("nome")
private String nome;
/* ... */
}
The ca...
I make a call to retrieve some data and the second call - which should be done within the first - uses one of the fields of the previous call.
val restApi = retrofit.create(RestAPI::class.java)
testAPI.searchDoc("language", "title_query")...