Questions tagged as 'retrofit'

0
answers

Handling JSON Response with Retrofit in Android Studio

To be very clear I'm developing a simple application test, where my user types the cpf of a registered customer and their data as clients appear on the screen. My server returns me a json with a simple structure like this: {"id":1,"name":"Luca...
asked by 23.11.2018 / 13:39
3
answers

Make request in a defined time interval

My application should update a list of data coming from the server every 5 minutes. Using Retrofit for HTTP request, what is the best way to do this?     
asked by 03.10.2016 / 04:39
1
answer

How to make a method wait for the server response in java using Retrofit2?

Hello friends I have the following method that requests the server: public MetaDataR metodo1(final String m) { Call<MetaDataR> call2 = new RetrofitConfig().getMetasService().getMetas(m); call2.enqueue(new Callback...
asked by 03.11.2018 / 14:56
1
answer

How can I go through this JSON and retrieve the Movies list?

I'm having trouble traversing this JSON and extracting data from the Array "movies". Follow JSON: ( link ) The error is this:    java.lang.NullPointerException on for (Movies m: catalogoMovies.movies) Here's a snippet of code: Ret...
asked by 17.08.2017 / 06:22
2
answers

Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 With WebService JAX-RS and Android Retrofit

I'm studying WebService and consumption on Android with Retrofit2. I've done tests with public APIs like ViaCEP and FIPE and I can use the retrofit quietly, very easy but when I set up my own webservice using JAX-RS with Jersey I have problem...
asked by 16.01.2017 / 18:59
0
answers

JaxB Converting Abstract Class with Retrofit

I have a Core project where the User class exists @XmlSeeAlso(value = {UserClient.class, UserProfessional.class}) public abstract class User implements Serializable { UserProfessional class @Getter @XmlRootElement(name="professional") @Xm...
asked by 19.10.2018 / 06:33
0
answers

Response retrofit arriving as null

I am trying to make a call via retrofit of a list of objects (Cadastros) and in the HttpLogginInterceptor the response is appearing normally. What could be happening? My call: CadastroApi cadastroApi = retrofit.create(CadastroApi.class);...
asked by 11.01.2016 / 17:42
0
answers

Selected Item Listview Retrofit

I have an application that uses retrofit for connection, and in it I have a listview where I want to make a long click on it and select the position item and make a webservice post with that item, everything is already working, getting the part...
asked by 26.09.2017 / 15:29
1
answer

Problems making a call using Retrofit on Android

I am a student and I have difficulty understanding where I am going wrong in a job that the teacher has passed. Describing briefly, the teacher provided an API in GitHub, which after completing the installation we can add products, suppliers and...
asked by 07.11.2017 / 07:48
1
answer

Why does Retrofit throw an exception when the status code is 204?

After a GET query only to check if a content exists on the server, the return is 200 (exists) or 204 (does not exist). Why does Retrofit throw the exception below when the server returns the Status Code: 204 In Content ?    java.net.P...
asked by 08.03.2017 / 21:39