kotlin start activity intent code example
Example 1: start new activity kotlin
val intent = Intent(this, NextActivity::class.java)
// To pass any data to next activity
intent.putExtra("keyIdentifier", value)
// start your next activity
startActivity(intent)
Example 2: intent kotlin example
val intent = Intent(this,SomeActivity::class.java)
startActivity(intent)
Example 3: how to start activity from fragment in kotlin
activity?.let{
val intent = Intent (it, Main::class.java)
it.startActivity(intent)
}