how to use retrofit with otto and picasso

1.7k Views Asked by At

I want to load data from my API into custom gridview in my android application, my API return some text information and some image URL as JsonArray. I want to use retrofit and otto and picasso (for loading image), also I want asynchronous fetching.

The problem is I can't understand how to use this libraries together (also I can't understand Asynchronous implementation of retrofit). can you offer me some tutorial or example that I can understand the scenario ?

P.S: I read this post and wiki of this libraries, but can't understand well.

please give me some full tutorial or example. thanks in advance.

1

There are 1 best solutions below

5
On BEST ANSWER

This is a good article and good introduction to retrofit, however his implementation is strange and works though.

You'll find a good example on how to use retrofit and otto on this repo: Flickr client

The API client using retrofit is in the async folder, please take time to understand, I remember it gave me a good hand with retrofit.

About Picasso you can see that later, this is gonna be handled later in your activity (or fragment) which has been register to the Otto bus. Picasso is just one line of code, you'll have more to do before with Retrofit and Otto :)