I have a DB existing that I copy on the device, and I can access with no problem. The problem, is that I must put a password to it (SQLCipher, I used "DB Browser for SQLite" to put that password), but now I want to access it by passing the password programmatically. Here is my code:
public class DatabaseAccess {
private SQLiteOpenHelper openHelper;
private SQLiteDatabase database;
private static DatabaseAccess instance;
private DatabaseAccess(Context context, String db_name) {
this.openHelper = new DBHelper(context, db_name);
}
public static DatabaseAccess getInstance(Context context, String db_name) {
instance = new DatabaseAccess(context, db_name);
return instance;
}
Thanks in advance.