I have used:
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'com.squareup.retrofit2:retrofit
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
Should i use like this way, i read retrofit 1.x
itself work on worker thread?
Should i have to use rxJava
and retrofit
together or just retrofit
work for me?
Yes you can.
You should add this dependencies in your gradle:
Permission in manifest:
A service creator could be like this:
You interface could be some like this:
And finally to make an api call: