Automatically Create Database Adapter Java Code for Android Developers


Automatically Create Database Adapter Java Code for Android Developers

I have written a web application which automatically creates a database adapter code in java for your Android application based on a text description of the database schema.   This grew beyond its initial intentions and now spits out java code for each of the following:

  • package statement
  • necessary imports
  • class definition for the database adapter
  • database constants (name, version, TAG)
  • definitions of keys and tables with comments
  • create table strings
  • String[] full projection for each table
  • an inserter function for each table
  • an updater function for each table
  • basic database helper code with onCreate and onUpdate

In fact, if you just want inserts and updates then this should generate complete java code for your adapter.  Just cut and paste your schema in, press the “do it” button and copy and paste your Android code into your application.

It’s housed on Google Apps, so may take a few seconds to get started the first time. <- click this to try it

Please give it a whirl and let me know if there are any problems.

1 Response to “Automatically Create Database Adapter Java Code for Android Developers”



  1. 1 Update to AutoDBAdapter for Android Developers « Brendan Scott’s Weblog Trackback on 31 May 2011 at 12:45 pm

Leave a comment




Blog Stats

  • 279,048 hits

OSWALD Newsletter

If you would like to receive OSWALD, a weekly open source news digest please send an email to oswald (with the subject "subscribe") at opensourcelaw.biz