Android app used with a pre-populated Encrypted SQLite database stored in Assets folder

328 Views Asked by At

-Using Android-Room i'm working on a project where i have to make an android app with a pre populated encrypted SQLite database stored in the Assets folder .

-When dealing with a non encrypted database i managed to copy the database file from the assets folder using this library: https://github.com/humazed/RoomAsset ;

-But when adding encryption to the Mix :

i realised Room doesn't provide any encryption support so i had to use this library: https://github.com/commonsguy/cwac-saferoom , it worked perfectly when a new database is created on runtime . But i can't make it work when the database is already encrypted and copied from the assets folder of the app

-Is there a way to use both libraries to do this ? or any other solution for my problem ?

Thanks in advance .

0

There are 0 best solutions below