ref: 2fa07b59f0a82d67c35c3fae9dd650d66c15155a
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() } } |