Android ORM released

14 May

So for a while now I’ve been working on a persistence layer for Android in the form of an active record style ORM. It’s been pretty successful in making database tasks a breeze while writing Android apps.

There are two apps on the market which use ActiveAndroid: Wootsi Lite and Pickrand. Wootsi Lite is a Woot notification app and Pickrand is a sample app (source) which picks random items from categories you create.

ActiveAndroid is available at https://www.activeandroid.com/. You can download a trial and the sample project.

Go check it out!

6 Responses to “Android ORM released”

  1. Ian C. Anderson 17. May, 2010 at 1:02 am #

    Does it not support floats? I added an issue in the tracker.

  2. Michael Pardo 17. May, 2010 at 9:36 am #

    @Ian

    Thanks for pointing this out. There was an issue with primitive types checking for a superclass. This issue is resolved and an updated jar has been made available.

  3. Ian C. Anderson 17. May, 2010 at 9:36 am #

    Thanks for the quick fix! I’ll be sure to try out the latest version tonight.

  4. Michael Pardo 17. May, 2010 at 9:41 am #

    No problem.

    One thing I thought of when trying to replicate this, is that maybe you had changed your model. This was not the case, however, it is a good note to make since I haven’t documented it yet. If you ever change your model, be sure to increment AA_DB_VERSION in the manifest.

  5. Ian C. Anderson 17. May, 2010 at 11:42 am #

    If I update the data model, keeping AA_DB_VERSION equal to 1, then wipe the emulator data before running, everything should be gravy, right?

  6. Michael Pardo 17. May, 2010 at 11:45 am #

    Correct. Changing AA_DB_VERSION informs AA that the model has changed, which then updates the sqlite database. If you clear the emulator data then there is no need to update the db version.

    Probably best to only update the db version when the schema changes for production versions I guess.

    Also, you can post questions here so others can see them http://tracker.activeandroid.com/projects/activeandroid/boards

Leave a Reply