Build an Android app that saves user data locally without writing any SQL code
Manage a local database in an Android app with automatic schema migration when the data structure changes
Ship an Android app with a pre-filled database of content that loads on first run
Replace Android's verbose SQLite setup code with simple Java objects that save and delete themselves
Add the Gradle or Maven dependency, initialize in your Application class, and annotate your model classes. No SQL setup needed.
ActiveAndroid is a Java library for Android apps that handles storing and retrieving data from a local database without requiring you to write SQL. It follows a pattern called Active Record, where each row in a database table is represented as a Java object. You call methods like save() and delete() directly on those objects, and the library translates those calls into the correct database operations for you. The library is aimed at Android developers who find working with SQLite directly to be cumbersome. Android's built-in database tools require a fair amount of setup code, and raw SQL can be error-prone to write and maintain. ActiveAndroid handles the configuration and low-level details so that the application code stays focused on the data itself rather than on how to store it. Features described in the wiki include creating database models, saving and querying records, handling custom data types through type serializers, using Android's content provider system, managing schema migrations as the database structure changes over time, and loading a pre-populated database that ships with the app. The library is added to an Android project through Maven or Gradle using the package com.michaelpardo:activeandroid. It is released under the Apache 2.0 open-source license, which allows use in both personal and commercial projects. The project was created by Michael Pardo, and contributions in the form of pull requests are accepted after review.
← pardom-zz on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.