Nous utilisons retrofit2 pour passer des appels réseau et obtenir nos données.Regarading retrofit 2
En ce qui concerne ce lien
https://square.github.io/retrofit/2.x/retrofit/index.html?retrofit2/Callback.html
Callback methods are executed using the Retrofit callback executor. When none is specified, the following defaults are used:
Android: Callbacks are executed on the application's main (UI) thread.
JVM: Callbacks are executed on the background thread which performed the request.
Maintenant, est-il possible au cours d'un appel à exécuter méthode pour faire une demande retrofit2 nous pouvons préciser quel type de rappel est à utiliser?
Merci
cela pourrait être ce que vous cherchez https://stackoverflow.com/a/33384551/7689086 –