0
我們正在使用retrofit2進行網絡調用並獲取我們的數據。Regarading retrofit 2
參照此鏈接
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.
現在有沒有在通話過程中的任何方式來執行方法,使我們可以指定哪些類型的回調,是retrofit2請求中使用?
謝謝
這可能是你在找什麼https://stackoverflow.com/a/33384551/7689086 –