Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper Android REST client [closed]

I made my own REST client library for an Android application, but after watching the Google I/O presentation on the subject I realized I had it all wrong (precisely what they show slide 9).

Now I am looking to do it again the right way, but I'm wondering if there isn't a library that could save me the trouble. We use Jersey on the server side.

I've looked at different solutions : CRest and Resty, but what I'd like to find an Android solution so I don't have to implement the ContentProvider stuff myself, and android-jbridge, but it doesn't look very active.

At this point I'm considering using RestTemplate (from Spring Android) and writing the stuff around it myself, but that'll take some time.

Any better alternative?

like image 360
MasterScrat Avatar asked Aug 03 '11 17:08

MasterScrat


2 Answers

"Developing Android REST client applications" by Virgil Dobjanschi led to much discussion, since no source code was presented during the session or was provided afterwards.

The only reference implementation I know (please comment if you know more) is available at Datadroid (the Google IO session is mentioned under /presentation). It is a library which you can use in your own application.

Update
There are other libraries available. I do not know how they confirm to Dobjanschis patterns, but I would like to list them for your reference (text is taken from the homepage of the library):

  • RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules.

  • RESTDroid (currently alpha) provides a way to handle calls to REST web-services. It contains only the fundamental logic to handle these requests, extension is possible with modules (some are provided).

like image 145
ChrLipp Avatar answered Oct 30 '22 15:10

ChrLipp


Another great library, sort of similar to RoboSpice, is Mechanoid Ops. It follows the pattern introduced / described by Virgil at IO 2010. Mechanoid also provides additional features that can come in handy such as SQLite database management.

see more here http://robotoworks.com/mechanoid/doc/index.html

like image 21
Joakim Avatar answered Oct 30 '22 14:10

Joakim