You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
607 B
29 lines
607 B
package net.pokeranalytics.android.util
|
|
|
|
import android.os.Bundle
|
|
import android.os.PersistableBundle
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
import io.realm.Realm
|
|
|
|
open class PokerAnalyticsActivity : AppCompatActivity() {
|
|
|
|
private lateinit var realm: Realm
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
|
|
super.onCreate(savedInstanceState, persistentState)
|
|
realm = Realm.getDefaultInstance()
|
|
}
|
|
|
|
override fun onDestroy() {
|
|
super.onDestroy()
|
|
realm.close()
|
|
}
|
|
|
|
/**
|
|
* Return the realm instance
|
|
*/
|
|
fun getRealm(): Realm {
|
|
return realm
|
|
}
|
|
|
|
} |