Creating an intent in Anko is very simple. Let's check the following steps:
- The functionality for which we wrote the preceding code can be achieved in just a few lines with Anko:
startActivity(intentFor<SomeActivity>("data" to 5).singleTop())
- If you don't want to add the flag, it is much simpler:
startActivity<SomeActivity>("data" to 5)
- Adding extra data doesn't require extra lines:
startActivity<SomeActivity>("data" to 5, "another_data" to 10)