A
A
Alexey2018-02-05 15:15:10
Android
Alexey, 2018-02-05 15:15:10

How to remove the "Retrofit isnt responding" error?

Data is being loaded from the site, if you wait a bit, then everything is OK, but if you immediately start receiving data, Retrofit isnt responding occurs. How to decide?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-02-05
@klim76

Because asynchrony ....
The application sent a request, the server processed and sent a response, the application received the data, chewed it into objects, and now the callback of your call is ready. And all of the above takes time, in the case of large amounts of data and poor Internet - a lot. And so that the main thread would not be stupid until it all worked out, the programmers invented asynchronous calls.
Read
the manual and you are trying to "immediately" get data that retrofit does not yet have

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question