views:

41

answers:

1

Hi,

I have a really strange problem.

I need to build custom sqlite3 database engine under Android OS, but I also want to use database provider implementation. Unfortunately when examining sources of Android 1.6 I noticed that it's not so easy.

Many classes including android.database.; packages use original provider, also many other parts of framework use android.database.sqlite.; packages directly, wich ofcourse make this abstraction a bit confusing and unnesesary.

But going to my question. If there is any way that I could extend database interfaces to use custom implmentation of sqlite (or any other database)?

A: 

If there is any way that I could extend database interfaces to use custom implmentation of sqlite (or any other database)?

Only by modifying the firmware.

CommonsWare
Not acceptable, I already managed to build native sqlite library (without jni yet), and custom provider (without some of the functionality like window filling or database creation from context)
dr4cul4
Frankly, I don't give a hoot what you consider to be "acceptable" or not. You cannot modify existing Java classes without replacing the firmware. As you noted, the database abstraction is not completely clean in Android, so merely subclassing the existing classes probably will be insufficient for your goals. Hence, while you can clone the existing code and create your own API-compatible workalikes, you will need to have them in your own Java package.
CommonsWare
I don't mind having them in my own package... I'm starting to consider completely new implementation in that case.
dr4cul4