Hi here
There seem to be lots of breaking changes from migrating from android-database-sqlcipher 4.5.3 to sqlcipher-android 4.6.1 is there like a detailed documentation for the changes?
For example, SQLiteDatabaseHook has new signature where postKey and preKey has connection parameter now, how do I execute raw queries and get cursor instance to check if migration succeeded?
SQLiteException is not found from the lib artifacts?
Hi @dev_danny,
Thanks for your interest in SQLCipher. The Java API’s attempt to remain similar, however, there are some differences. We have a migration guide available here which you should read if you haven’t yet.
Hi @developernotes thank you for the response, checked the migration guide but It does not cover all changes
- on SQLiteDatabaseHook has new signature where postKey and preKey has connection parameter now, how do I get db instance from the connection to execute raw queries and get cursor instance to check if migration succeeded?
- What is the replacement of net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(password) ?
Hi @dev_danny,
The SQLiteDatabaseHook
isn’t operating at the same level with the sqlcipher-android
library as compared to android-database-sqlcipher
. If you need a resultset, you could invoke executeForCursorWindow
. An example can be found here.
The SQLiteOpenHelper
constructors takes either a String
or byte[]
for the password material, then you can just invoke getWritableDatabase()
.
Thank you @developernotes
A quick one, with the new artifact and version is it necessary to add libstlport_shared.so, libdatabase_sqlcipher.so, and libsqlcipher_android.so in my project jniLibs directory?
Hi @dev_danny,
No, you can just reference the library via AAR as documented here.