13

Referring https://www.youtube.com/watch?v=xHXn3Kg2IQE. Can anybody provide source/links which implements such a design?

Kay Zed
  • 1,126
  • 1
  • 17
  • 29
SpunkerBaba
  • 2,097
  • 4
  • 18
  • 12

6 Answers6

21

The Google I/O app follows this design and is easy to follow.

Also a Google engineer briefly describes a REST client development here.

Sergii Rudchenko
  • 5,120
  • 2
  • 26
  • 24
alexanderblom
  • 8,512
  • 6
  • 32
  • 40
15

I wrote an Android library based on this specific video session from Google IO 2010. It's ready for production and is already used in several apps

It's called DataDroid and will allow you to add easily to your project :

  • Local data management in a Sqlite database
  • Local data management in memory
  • REST Webservice calls with management of configuration changes (orientation for example) and Activities hiding for a phone call for example

The project contains :

  • The Android Library containing all the classes needed
  • A proof-of-concept project containing examples of code using the Android Library for the different use cases seen above as well as skeleton classes you can copy in your project and modify easily (there are filled with TODOs explaining what you have to do)

Each feature can be implemented independently from the others, so depending on which features you want to use in your project you may need only a part of the skeletons provided in the example project.

Last thing it's available on GitHub under the Beerware license :

As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

You can find more information about its architecture, the way to add it in your project or some examples of apps using it on its official website

Foxykeep
  • 218
  • 2
  • 6
1

See the restful-android example code here:

https://github.com/aug-mn/restful-android

This is a project of the Twin Cities Android Dev Group (aug.mn) led by Jeremy Haberman, Brad Armstrong, and me that aims to provide a reference implementation for the main pattern described in the talk.

There is a restful-android version of his diagram in the docs directory of the source tree that highlights which components are custom, and which are facilities provided by Android SDK classes. You can see Jeremy and Brad doing an overview of it at Minnebar this year:

http://www.youtube.com/watch?v=JkU3VM1Vyp0

Peter Pascale
  • 1,458
  • 1
  • 15
  • 10
  • To get this project to compile (cloned 24.3.13) I had to rename the "lib" folder to "libs" and add a closing ")" to the create profiles table in the ProviderDbHelper class. – TouchBoarder Mar 24 '13 at 22:29
0

You may like Enroscar. Is's based on Google's patterns and looks powerful. Actually, I haven't used it on commercial projects. See their example project.

Gurnetko
  • 76
  • 4
0

You can take a look to RESTDroid which implements the Service Pattern (pattern A) shown in this video.

Pierre Criulanscy
  • 7,771
  • 3
  • 20
  • 36
0

I'm quite successfully using Resteasy mobile, it does automatic proxying using provided interfaces and it's annotations.

inteloid
  • 737
  • 1
  • 7
  • 18