We have developped a library that adresses this issue : RoboSpice.
The library uses the "service approach" described by Virgil Dobjanschi and Neil Goodmann, but we offer a complete all-in-one solution that :
- executes asynchronously (in a background AndroidService) network
requests that will return POJOs (ex: REST requests)
- caches results (in Json, or Xml, or flat text files, or binary files)
- notifies your activities (or any other context) of the result of the network
request if they are still alive
- doesn't notify your activities of the
result if they are not alive anymore
- notifies your activities on
their UI Thread
- uses a simple but robust exception handling model
- supports multiple ContentServices to aggregate different web services
results
- supports multi-threading of request executions
- is strongly
typed !
- is open source ;)
- and tested
We are actually looking for feedback from the community.