Navigation in Jetpack Compose

Sep 10 2024 · Kotlin 1.9, Android 14, Android Studio Jellyfish

Lesson 03: Pass Data

Demo

Episode complete

Play next episode

Next

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In this demo, you’ll continue to build on the movie-booking application from the previous lesson.

val intent = Intent(Intent.ACTION_SEND)
val intent = Intent(Intent.ACTION_SEND).apply {
  type = "text/plain"
  putExtra(Intent.EXTRA_SUBJECT, "$movieName booking details")
  putExtra(Intent.EXTRA_TEXT, "You have booked $ticketCount ticket(s) for $movieName")
}
context.startActivity(
  Intent.createChooser(intent, "Share movie booking details")
)
Button(
  modifier = modifier.fillMaxWidth(),
  onClick = {
    shareBookingDetails(
      context = context,
      movieName = movieName,
      ticketCount = ticketCount,
    )
  }
) {
  ...
}
See forum comments
Cinema mode Download course materials from Github
Previous: Instruction Next: Conclusion