Newer
Older
DevRealm / app / src / main / java / jackall / devrealm / App.kt
MatsumotoKeiju on 8 Nov 2017 456 bytes [add] Init realm, Realm set default configuration
package jackall.devrealm

import android.app.Application
import io.realm.Realm
import jackall.devrealm.db.RealmConfig

/**
 * Created by matsumoto_k on 2017/11/08.
 */
class App : Application() {
    companion object {
        lateinit var instance: App
            private set
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        Realm.init(this)
        Realm.setDefaultConfiguration(RealmConfig().config)
    }
}