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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Blog Stats

  • 215,157 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

%d bloggers like this: