Mobile App Dev Diary

Android (Java, Kotlin), iOS (Swift), Xamarin (C#)

Kotlin 1.1 / Screen transition with Intent

Screen transition in Kotlin version 1.1.

When you transite to “NextActivity”, use this.

val intent = Intent(applicationContext,

Or you may want to define package-level function to instantiate Intent. Simply speaking, “package-level” means outside class definition.

//package-level functiono
fun getNextActivityIntent(context: Context) : Intent {
    return Intent(context,

You can call this function from Activity class.