ref: 2e654e2ade259ac4fcbc0cbc7b7d713511d370fe
app/src/main/java/ml/adamsprogs/bimba/activities/SplashActivity.kt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
package ml.adamsprogs.bimba.activities import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.content.Intent import ml.adamsprogs.bimba.models.Timetable class SplashActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val timetable = Timetable(this) if(timetable.isDatabaseHealthy()) startActivity(Intent(this, MainActivity::class.java)) else startActivity(Intent(this, NoDbActivity::class.java)) timetable.close() finish() } } |