Closed fat-tire closed 5 years ago
Makes sense to me. I like Sugar, but agreed, it doesn't seem up to date.
On thing we have been considering though, is migrating to SQLCipher and IOCipher for encrypted data and media storage. With Sugar, we can fork it, and put SQLCipher underneath. With the Android Room API, we cannot do that.
Currently the Sugar is not supported by Instant Run
feature of Android Studio 2.2+, so we are facing some SQLExceptions as mentioned in #63
@n8fr8 -- Is the system full-disk encryption not sufficient for Haven's purposes?
@n8fr8 Room supports other Sqlite implementations such as SQLCipher. It involves something like:
// EditText passphraseField;
SafeHelperFactory factory=SafeHelperFactory.fromUser(passphraseField.getText());
StuffDatabase db=Room.databaseBuilder(ctxt, StuffDatabase.class, DB_NAME)
.openHelperFactory(factory)
.build();
This example uses the SafeRoom
database implementation, but I imagine using SQLCipher would be similar.
More info on that here:
https://commonsware.com/AndroidArch/previews/securing-your-room
On thing we have been considering though, is migrating to SQLCipher and IOCipher for encrypted data and media storage. With Sugar, we can fork it, and put SQLCipher underneath. With the Android Room API, we cannot do that.
@n8fr8 is database encryption still a thing we should aim for? This was not done in #307 . Let me know what you think.
This is just a thought, but the Sugar ORM library seems to be pretty old, as in it hasn't been updated for 8 months, still targets sdk 23, and I'm not sure if it's being updated?
The new Android Room Persistence Library does basically the same thing but perhaps it will be better maintained over time as it's a Google standard library? So maybe move the Event and EventTrigger classes over? (Does anything else use SugarRecord?)