This Gist was created to demonstrate the solution for SO Answer https://stackoverflow.com/a/44450154/6611700
Steps:
- Add SQLCipher dependency in your application's build.gradle file
compile net.zetetic:android-database-sqlcipher:3.5.7@aar
- Initialize SQLCipher's native library before performing any db ops by calling:
net.sqlcipher.database.SQLiteDatabase.loadLibs(context)
- Then use SQLiteHelper or similar implementation to create and use the encrypted database