Shelves, an Open Source Android application

A few months ago, I showed Shelves, an application to manage a collection of books on Android powered phones. I am an avid user of Delicious Library on MacOS X and I since no similar application existed at the time for Android, I decided to write my own. Needless to say, Shelves was largely inspired by Delicious Library.

Even though Shelves is not quite ready to be release on the Android Market, I decided to publish the source code under the Apache 2.0 license. The application is already usable and lets you add books by searching Google Books or by scanning their barcode (if you have the application called Barcode Scanner installed), search your collection by keywords or barcodes, import books from a CSV file and delete individual books. The only two features I need to implement before releasing Shelves are the ability to manually add/edit a book and to view a book’s details.

If you are curious, you can see Shelves in action in the following video. You can also visit Shelve’s project page for screenshots showcasing several features.

Note: the colors on the video are different from what you would see on an Android device. I created the assets specifically for mobile devices and the colors appear therefore more saturated on a computer monitor.

47 Responses to “Shelves, an Open Source Android application”

  1. Julien Ponge says:

    You did not make a Maven POM??? ………. Just kidding ;-)

    Thanks Romain for making it available, this will make a good showcase application to learn Android development.

    See you soon!

  2. Mariano Kamp says:

    Wow, that looks really awesome.

    And indeed, it will be a fountain of demo code.

    From looking at the video I guess you used a TouchDelegate. Afer our IRC conversation (androidquestioner) I tried for some hours, but gave up on that to wait for a sample and will now re-work my solution with a TouchDelegate.

  3. Romain Guy says:

    Hi Mariano,

    I am not using TouchDelegate, there’s no reason to in this UI.

  4. Really well done! (as usual :-D )

    Concerning Delicious Monster… Do you have published online your library?

  5. Romain Guy says:

    I have an old version here: http://www.progx.org/deliciouslibrary/index.html
    I should update it :)

  6. PoP says:

    2 things:
    - you have a LOT of books
    - nicely done the “Google a 200%” at the end ;-)
    - I want a G1 to do the same with my books

    (yes, I did say “2 things”)

    You’re running on Cupcake?

  7. Romain Guy says:

    Not all my books are shown on this page and Google à 200% is in there only because I wrote the French translation :P

    The video is the emulator running Cupcake indeed.

  8. Al says:

    That’s pretty cool. I had a look around the source code (but couldn’t understand most of it). For the layout, you used a merge tag. What does that do? I couldn’t find a documentation on it, is it something like <include = “@layout/somelayout” />?

  9. Romain Guy says:

    XML implies a root tag in every document. Unfortunately, in the case of Android, this means you have to have a root View in every XML layout document. This often leads to unnecessary views in the hierarchy. The tag is just a way to skip that root View and add all the Views declared in XML directly into the parent in which the layout is inflated. It’s an optimization :)

  10. Mark Murphy says:

    Hi! You may remember me from all the times you’ve corrected my mistakes in various blogs and discussion groups!

    ;-)

    I am interested in Shelves, but with support for BookMooch (http://www.bookmooch.com). Have you given any thought to how you’d like folk to extend or reuse Shelves for other “libraries” beyond Delicious Library and Google Books?

    BTW, how did you make the wood grain (shelf_panel.png)?

    Thanks!

  11. Romain Guy says:

    Hi Mark,

    I have no plan on supporting online services right now. Shelves can import books form Google Books Search and Amazon (although that part is not open sourced, it’s only on my hard drive because it would violate the Amazon ToS to distribute it.) However, I would love the app to be able to connect to online services to sync the books collection.

    The wood grain was made in Photoshop.

  12. Mark Murphy says:

    I’m looking to create a BookMooch Android app, partly because I’m a fan of BookMooch, and partly because I’m looking to create something worth uploading to the Market — I need to go through that exercise for a chapter in my upcoming Advanced Android book, and none of my dinky samples are worth it. I’d love to use Shelves, or at least parts of it, because its UI is right in line with what I need. And, I’m looking to build this between Feb 22 and March 23 or thereabouts.

    Shelves is your baby, and so regardless of its Apache license, I want to conduct my work in a way that makes you happy.

    Which of the following models would you prefer for my work?

    1. You don’t have any time to fuss with any of this now, so I should fork Shelves for my own app, with the possibility of working to merge changes back into Shelves at some future date.

    2. You have a tiny bit of time to fuss with this now, so I should work with you to split ShelvesView out into a separate project, so other applications than Shelves can use the super-slick shelving UI, while Shelves itself can focus on your current back-end integrations.

    3. You have time to review patches and such and are interested in support for services like BookMooch, so I should check out your code and work on Shelves proper.

    4. You have already filed a restraining order preventing me from posting comments on your blog… ;-)

    5. Something else.

    Again, it’s really your call — I can always build my app sans Shelves, or build some other app entirely. Just let me know what you feel is appropriate.

    Thanks!

  13. Romain Guy says:

    Hi Mark,

    I would be happy with #3 :) I wanted to release a 1.0 on Market rather sooner than later so you might need to work in a branch, unless I slack off (very plausible :)) which will give you time to do it before ship.

  14. Mark Murphy says:

    Great! I’ll be back in touch in a week or so! Thanks!

  15. gasolin says:

    Hello, I’ve made Anobiit on Android Market which help people manage their book on aNobii (a online book shelve), it does have ‘shelve view’ as Shelves did :)

    Anobiit is not ready for offline usage though.
    http://www.cyrket.com/package/com.gasolin.android.anobiit

  16. Romain Guy says:

    Doesn’t Anobiit just open a browser though?

  17. gasolin says:

    Anobiit is another options to manage books without much coding :p

    Since Anobiit is limited to online bookshelve, I’d like to learn Shelves code to see if Shelves is possible to swith from google book search to other book search engine, since google book search did not cover much books out of the US :)

  18. Romain Guy says:

    I wrote Shelves so that one can add any books search engine. Like I mentioned before, I also have an Amazon engine. When Shelves looks for a book (barcode scan or manual search), it queries all the registers books search engines.

  19. Stefan Willoughby says:

    What is the status of this project?
    I’m no programmer and can’t figure out the whole source code thang.
    Shelves is exactly what I’m looking for as the “Killer App” for my Android.
    Any chance I could either get instructions on how one compiles code for Android
    Or perhaps a compiled .apk file I can install.

    Cheers

  20. s says:

    here is how i installed it (for future google queries until romain guy publishes the apk)

    # download and install android sdk
    downloading: http://developer.android.com/sdk/1.5_r2/index.html
    installing: http://developer.android.com/sdk/1.5_r2/installing.html

    (if you don’t intend doing development, skip the eclipse installation parts)

    # checkout shelves code from its subversion repository
    $ svn checkout http://shelves.googlecode.com/svn/trunk/Shelves shelves

    # change current directory to checked out source code and create a new build.xml (it seems current repo contains an old version
    $ cd shelves
    $ android update project –target 2 –path .

    # build the project
    $ ant build –debug

    you should see that the project is compiled and a apk file is created in bin directory with a name of .activity.ShelvesActivity-debug.apk

    # connect your phone to install the app
    $ cd bin
    $ adb install .activity.ShelvesActivity-debug.apk

  21. Romain Guy says:

    Instead of ant build, cd bin, adb install you can simply type ant reinstall.

  22. raysilverstone says:

    I was just wondering when this app is going to be published to the android market. I have been wanting to use this app for some time now. An release date or roadmap would be nice.

  23. Romain Guy says:

    Sorry I’m too busy at the moment.

  24. Laurie says:

    Hi! This looks really slick. I was using another app on my windows mobile phone, but am looking at the Android. I was wondering, if I add a book to the shelf, can I label or tag is as read or want to read? That would be very helpful. I have bought or read a book twice more than once, so something like that would be really great. I hope you have a chance to make it to the android market soon. Thanks!!

  25. Marta says:

    Hi,

    Will it be permitted to add our own bookcovers? Manually, I mean…

  26. Jerry says:

    Would really love an app like this if you could publish it to the Android Marketplace… In the comments of the Youtube Demo of the app – a lot of requests for the name of it…

  27. Andreas says:

    Hi, it seems the “see it in action” movie is down n the project site.

  28. coaver says:

    Please, please please, finish this project. I am a HUGE reader and very much need this to catalog my physical books and ebooks. You should know that I am more than happy to pay for a program like this and I am sure many others out there would be too. Thank you for sharing with the world. :)

  29. bimble says:

    Is anyone still looking at this? Been trying to build it following s’ instructions, but keep hitting build fails…

    Target “build” does not exist in the project “ShelvesActivity”.

  30. Arnauld VM says:

    It seems close to the kind of application I was looking for.
    Would be nice if it could also use Google Books to *synchronize* the collection.

    On another hand: What is the status of the project? What would remain to do before it could be published?
    Is the project open for collaboration?

  31. Romain, I hope you don’t mind, but I’ve taken your source code, packaged it, fixed some bugs, and redistributed it on the Android market: http://code.google.com/p/shelves-android-trd/

    This is all permitted to me under the Apache License. I’d like to continue to maintain the project. Thank you for understanding.

  32. Romain Guy says:

    I wouldn’t mind, normally. But why did you fork it instead of contributing? Why did you use the same name (thus preventing me from releasing my own work someday? Also you mention on your web page that you might change the license to GPL or MIT, which you cannot do without my consent.

    You are working within the confines of the Apache 2.0 license but I would have appreciated if you had talked to me about this before.

  33. Garen says:

    Well, to begin with, Google Projects doesn’t have any easy mechanism for contributions, as does, say, GitHub. And, with absolutely no offense intended, judging by the comments from this post it didn’t seem that there was much interest in maintaining the Shelves app. In fact, the last comment made by you on the subject here was that you were too busy at the moment.

    I think Shelves had gone beyond a simple tool for people to dive into Android programming. Most of the source was written in ’08 or ’09, geared towards 1.5, and yet people are still commenting on this blog and other locations about its sweetness. We can most certainly talk about pushing my changes into the original Shelves project if you’ll grant me permission. I would like that.

    You could have very easily packaged an APK, but you didn’t; as well, another user here instructed how to make the APK through the command line. I don’t believe I am the sole obstacle that prevented you from releasing the work someday, as anybody could have snatched it all. Nor do I make any claims of writing much of the original source!

  34. Romain Guy says:

    No indeed but using my app’s name was not a nice move anyway, no matter how you defend it :)

  35. Romain Guy says:

    BTW, I have an Amazon importer but it’s not open sourced nor available in the app because it violates Amazon’s terms of service.

  36. I thought that might be the case–I saw the references to the Amazon store. That’s really unfortunate. Google Books just seems so faulty.

  37. Can I reuse this post on my blog?

  38. Thomas Messier says:

    I’m trying to use this project as a way to learn some Android development but am running into issues trying to get it to run. Right off the bat, I have errors in a bunch of files related to the org.curiouscreature.android.shelves.R. Things like “R.layout.screen_add_search cannot be resolved”. Sure enough, when I open R.java, R.layout.screen_add_search is not defined in it. Am I missing something here? Thanks for any help.

  39. Thomas Messier says:

    What do you know, a little more digging and I figured it out. The auto-generated R.java file was wrong for some reason, I just edited one of the layout XML files and it got re-generated, fixed everything, works like a charm!

  40. Nic says:

    Hi
    I have Delicious Library on my mac, and Shelves on android phone, can I export from DL to shelves?? to save re-entering.. can’t figure out which is best export method.
    Hope someone has done this and can help.

  41. Jim says:

    I just found this app and have only used it for a few minutes but the first thing I wanted to do was to add a new category. Are there any plans to add this functionality? As I think about it though, this might not be easy to do since you would need a way for the user to add a unique icon to the new category. I guess you could just make a generic icon that would be the same for any new additions. Anyway, it’s a great app the way it is. That’s just something that came to mind while I was using it.

  42. Jose says:

    Guy Romain I checked out the project some months ago, and I saw that was a great source to learn many technical issues in Android but today I checkout the project and cannot import it into Eclipse, reason ? I don’t know why I cannot import it. thanks

  43. Wood says:

    Is there a Windows base program I can use like Delicious Library to help manage my collection?

  44. Demyan says:

    Your blog article is extremely intersting and fanstic,at the identical time the web site subject is unique and perfect,good position.To your success.