You have created a NextActivity class that relies on a string containing some data that pass inside the intent Which code snippet allows you to launch your activity?

  • Intent(this, NextActivity::class.java).also { intent ->
    startActivity(intent)
    }
  • Intent(this, NextActivity::class.java).apply {
    put(EXTRA_NEXT, “some data”)
    }.also { intent ->
    activityStart(intent)
    }
  • Intent(this, NextActivity::class.java).apply {
    putExtra(EXTRA_NEXT, “some data”)
    }.also { intent ->
    startActivity(intent)
    }
  • Intent(this, NextActivity::class.java).apply {
    put(EXTRA_NEXT, “some data”)
    }.also { intent ->
    activityStart(intent)
    }
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend