When should one use RxJava Observable and when simple Callback on Android?

后端 未结 9 2182
庸人自扰
庸人自扰 2020-11-29 14:05

I\'m working on networking for my app. So I decided to try out Square\'s Retrofit. I see that they support simple Callback

@GET("/user/{id}/         


        
9条回答
  •  攒了一身酷
    2020-11-29 14:43

    It looks like you're reinventing the wheel, what you're doing is already implemented in retrofit.

    For an example, you could look at retrofit's RestAdapterTest.java, where they define an interface with Observable as return type, and then use it.

提交回复
热议问题