Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get realm instance
fun getRealm(context: Context): Realm {
try {
Realm.init(get())
} catch (e: Exception) {
}
val config = RealmConfiguration.Builder()
.schemaVersion(1)
.migration(Migration())
.build()
return Realm.getInstance(config)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment