How can I use ORMLite with SQLCipher together in Android?
It should be possible @Bruno.
One way that should work is to just copy ORMLite's OrmLiteSqliteOpenHelper
class into your project, rename it to LocalOrmLiteSqliteOpenHelper
or something, and change the base class to be the SQLCipher
helper class. I can't believe they didn't rename the class to be SQLCipherSQLiteOpenHelper
. (grumble)
public abstract class LocalOrmLiteSqliteOpenHelper
extends info.guardianproject.database.sqlcipher.SQLiteOpenHelper {
Another way would be to have your helper extend SQLCipher
's SQLiteOpenHelper and then implement the various things you need from OrmLiteSqliteOpenHelper
yourself. That would take a bit more work however. ORMLite has to do a little dance with database connections while the database is being created otherwise it goes recursive.
Let me know if either of these work.