Does the SqlCipher support createFromAsset() method?
I have seen topic about using export method for prepopullated database.
I have a prepopulated database which also has to be encrypted, code i have posted below should create database.
After i run this code i cannot access db on app. I’ve got an error:
net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
When I download db file from device files and open on db browser it is not encrypted.
Thank in advance for any help.
final SupportFactory factory = new SupportFactory(key.getBytes()); myDatabase = Room .databaseBuilder(application, MyDatabase.class, DB_NAME) .openHelperFactory(factory) .createFromAsset("MyDatabase.db") .build();