I started using sqlCipher for Android (ver) 2.1.1 and it works like charm on Android 4.0.3. However I found that the SQLiteOpenHelper
class does not have the constructor that takes the custom Error handler. This is very much there in the original SQLiteOpenHelper
class provided in android.database and it is very useful to handle the errors in an app specific manner. Does anyone know how to incorporate a custom error handler when using sqlCipher?
Constructors available in android.database.sqlite
public SQLiteOpenHelper (Context context, String name, SQLiteDatabase.CursorFactory factory, int version);
public SQLiteOpenHelper (Context context, String name, SQLiteDatabase.CursorFactory factory, int version, DatabaseErrorHandler errorHandler);
Constructors available in net.sqlcipher.database
public SQLiteOpenHelper (Context context, String name, SQLiteDatabase.CursorFactory factory, int version);
In specific, when encountered with certain types of errors the default error handler (when using sqlcipher) is removing the database, albeit after providing a Log.e message. But I need to avoid it. Any help is appreciated.