2

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.

Mohamad MohamadPoor
  • 1,350
  • 2
  • 14
  • 35

1 Answers1

0

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 :)

Tíbó
  • 1,188
  • 13
  • 28
  • There is so much wrong about that Flickr client... – Anton Feb 12 '15 at 07:41
  • 1
    In that case elaborate, any feedback is appreciated! – Tíbó Feb 12 '15 at 11:43
  • Anton you have posted this on quite a few answers but haven't provided any actual reasons. I would be awesome if you could elaborate instead of just stating that it's wrong. Maybe point to a better source or mention some of the issues at least. – Adam Peck Feb 16 '15 at 04:59
  • I don't have much time/desire to highlight all the problems, from the top of my mind: creation of rest adapter every time you make a network request is silly, no loading progress, no error handling - how would you know that your request failed? fragments management is real bad, and in general the code quality is real low – Anton Feb 21 '15 at 05:02
  • Please highlight the problems then! – Tíbó Jun 24 '15 at 09:44