Daniel
05/16/2018, 6:25 AMRx support
as I do not want to increase the original library’s method count. This is similar to how you can add optional Rx support
to Retrofit
and Retrofit can work with Rxjava
. I tried finding ways to do it but without results.
Can anyone who has worked on it help me out on how to set it up? Maybe some code examples or websites on how to do it?gildor
05/16/2018, 6:31 AMmzgreen
05/16/2018, 6:36 AMgildor
05/16/2018, 6:49 AMgildor
05/16/2018, 6:50 AMursus
05/17/2018, 12:36 AMDaniel
05/22/2018, 6:08 AMrxjava
. Im trying to implement the same. Right now by library has few methods which will return Call<Object>
, without any change in the current library, I want to implement another library which works as an adapter to return Observable<Object>
when using the main library methods.gildor
05/22/2018, 6:19 AMgildor
05/22/2018, 6:21 AMCall
for async work, I don’t think that you can easily convert it to retrofit, only if you use extension functions that wrap Call to Observable.
For Kotlin library, if the only thing that you want is different abstraction for callbacks, I would choose suspend functions and coroutines instead of Call/Observable etc