20100306

PsqlDroid: A Native PostgreSQL Library for Android

I was a bit bored with my current project, and was looking over some of the work I did recently, and remembered that I ported PostgreSQL to Android a while ago. After gaining approval to make my work publicly available, I put it up on Google Code. So be sure to check out the PsqlDroid project page if you're interested.

There is still a considerable amount of work to be done to publish Java bindings in the Dalvik VM (probably with with the existing PostgreSQL JDBC driver).

Any help is appreciated!

3 comments:

Pedro said...

Great work!

Been looking for time for quite some time now... ;)

Knowing that this is still in its early stages the question is:

- How to implement the binaries in a real device? (in this case a htc magic)
- Could you please post a skeleton API so that at least some testing can be done?

Best regards,
Pedro Doria Meunier

Christopher Friedt said...

Hi Pedro,

Sorry for not having already written installation instructions on the Wiki - time is very limited for me right now.

To install the binaries on to a real device, you really just need to use the "adb push" command, after first re-mounting the filesystem read-write.

They have been tested on a G1 device and an industrial handheld that I've ported Android to. If you feel like trying it out, you can run it either from the adb shell, or directly on your phone with the terminal emulator.

I suspect what you would ideally like is to have them packaged in an .apk file. I'm not 100% sure if binary file installation is supported with the Android .apk system though (much like with .jar files).

Christopher Friedt said...

I was just looking into this a bit further, and it should be possible to distribute binaries within .apk files, as long as the .apk is packaged with the Android NDK. That's another thing that I will get to ... someday ... but it will at least be the right place to look into creating a Dalvik-compatible Postgres JDBC driver with native libpsql support.