Newer
Older
OverlayMultiCounter / app / src / main / kotlin / jackall / overlaymulticounter / App.kt
MatsumotoKeiju on 8 Nov 2017 564 bytes [add] Init realm, Realm default configuration
package jackall.overlaymulticounter

import android.annotation.SuppressLint
import android.app.Application
import io.realm.Realm
import jackall.overlaymulticounter.db.RealmConfig

/**
 * Created by matsumoto_k on 2017/11/08.
 */
class App : Application() {
    companion object {
        @SuppressLint("StaticFieldLeak")
        lateinit var instance: App

        fun get() = instance
    }

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