mardi 22 septembre 2015

Can't integrate SQLCipher with greenDao in android

I have added greendao library to my project . GreenDao has a version that supports sqlchiper http://ift.tt/1KJOpxg . But I can't implement it . I can generate dao , but I can't crate database .

Before adding sqlchiper I created database like this

    DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(context, "test-db", null);
    SQLiteDatabase db = helper.getWritableDatabase();

    DaoMaster daoMaster = new DaoMaster(db);

    daoSession = daoMaster.newSession();

But in order to to encrypt it we have to use this method like this

SQLiteDatabase db = helper.getWritableDatabase("password");

But the problem is though I have added greenDao which has sqlchiper integrated , but I can't pass parameter getWritableDatabase() method .

How can I implement it ?

Aucun commentaire:

Enregistrer un commentaire