# Kotlin and Android

Kotlin is Android's recommended programming language for modern android development.


## Docs

- [Kotlin and Android](https://developer.android.com/kotlin.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Add Kotlin to an existing app](https://developer.android.com/kotlin/add-kotlin.md.txt): This document details how to integrate Kotlin into an existing Android Studio project, including creating new Kotlin files, configuring the environment, and converting existing Java code to Kotlin.
- [Adopt Kotlin for large teams](https://developer.android.com/kotlin/adopt-for-large-teams.md.txt): This document outlines strategies for large teams to successfully adopt Kotlin for Android development, covering team building, gradual integration, and key considerations like interoperability and testing.
- [Kotlin flows on Android](https://developer.android.com/kotlin/flow.md.txt): Learn about Kotlin Flow, a type that emits multiple values sequentially and is built on top of coroutines, enabling asynchronous data streams for live updates in Android applications.
- [List of KTX extensions](https://developer.android.com/kotlin/ktx/extensions-list.md.txt): This document lists Kotlin extension functions and properties for various AndroidX KTX libraries, detailing their dependencies and usage for components like Activity, Lifecycle, Navigation, Paging, and Graphics.
- [Set up the Android Gradle library plugin for KMP](https://developer.android.com/kotlin/multiplatform/plugin.md.txt): This document describes the `com.android.kotlin.multiplatform.library` Gradle plugin, an officially supported tool for adding an Android target to Kotlin Multiplatform library modules, detailing its features, benefits, migration guide, and usage.
- [Set up ViewModel for KMP](https://developer.android.com/kotlin/multiplatform/viewmodel.md.txt): This document guides you through integrating and using AndroidX ViewModel in Kotlin Multiplatform projects, including setup, usage in common and Android code, and specific steps for SwiftUI integration on iOS.
- [Kotlin coroutines on Android](https://developer.android.com/kotlin/coroutines.md.txt): This document introduces Kotlin Coroutines on Android, explaining how they simplify asynchronous programming and manage long-running tasks to prevent UI unresponsiveness.
- [Android&#39;s Kotlin-first approach](https://developer.android.com/kotlin/first.md.txt): This document explains Google&#39;s commitment to making Android development Kotlin-first, detailing the reasons behind this decision, such as developer feedback, improved productivity, and safer code, and what it means for Android development tools and content.
- [Setup your environment (Kotlin Multiplatform)](https://developer.android.com/kotlin/multiplatform/setup.md.txt): This document describes how to set up the development environment for Kotlin Multiplatform (KMP), including tool installation, project creation using the KMP wizard, and an overview of the project structure and dependency management.
- [Build Better Apps with Kotlin](https://developer.android.com/kotlin/build-better-apps.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Learn Kotlin for Android](https://developer.android.com/kotlin/campaign/learn.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Testing Kotlin coroutines on Android](https://developer.android.com/kotlin/coroutines/test.md.txt): Learn how to unit test Kotlin coroutines and suspending functions in Android applications using the kotlinx.coroutines.test library, focusing on `runTest`, `TestDispatchers`, and dependency injection for testable code.
- [Parcelable implementation generator](https://developer.android.com/kotlin/parcelize.md.txt): The `kotlin-parcelize` plugin automatically generates `Parcelable` implementations for Kotlin classes, simplifying data serialization in Android development. It supports various types, custom parcelers, and multiplatform projects.
- [Testing Kotlin flows on Android](https://developer.android.com/kotlin/flow/test.md.txt): This document provides guidance on testing Kotlin Flows in Android, covering how to create fake producers, assert flow emissions, handle continuous collection, and specifically test StateFlows, including those created with the stateIn operator.
- [Kotlin-Java interop guide](https://developer.android.com/kotlin/interop.md.txt): This document provides a set of rules and best practices for authoring public APIs in Java and Kotlin to ensure they are idiomatic when consumed from the other language, including specific guidelines for each language and how to use Lint checks.
- [Set up DataStore for KMP](https://developer.android.com/kotlin/multiplatform/datastore.md.txt): This document explains how to set up and create DataStore instances in Kotlin Multiplatform projects for Android, iOS, Web, and JVM, specifically focusing on DataStore Preferences.
- [Set up Room database for KMP](https://developer.android.com/kotlin/multiplatform/room.md.txt): This document guides developers on integrating and using the Room persistence library within Kotlin Multiplatform (KMP) projects, covering dependency setup, database definition, platform-specific builders, and migration considerations from Android-only Room.
- [Additional resources for Kotlin coroutines and flow](https://developer.android.com/kotlin/coroutines/additional-resources.md.txt): Find a curated list of additional resources to deepen your understanding of Kotlin coroutines and Flow, organized by topic for easy navigation.
- [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow.md.txt): This document explains StateFlow and SharedFlow, which are Flow APIs in Kotlin for Android that allow optimal emission of state updates and values to multiple consumers.
- [Associate Android Developer certification in Kotlin](https://developer.android.com/kotlin/get-certified.md.txt): The Associate Android Developer Exam assesses skills for entry-level Android developers, and passing it leads to a certification demonstrating knowledge in Android development.
- [Best practices for coroutines in Android](https://developer.android.com/kotlin/coroutines/coroutines-best-practices.md.txt): This document outlines best practices for using Kotlin Coroutines in Android applications, focusing on making apps more scalable, testable, and robust. It covers topics like Dispatcher injection, main-safety, ViewModel responsibilities, immutability, exception handling, and cancellation.
- [Kotlin on Android FAQ](https://developer.android.com/kotlin/faq.md.txt): Answers common questions about using Kotlin to build Android apps, including IDE support, Java interoperability, coroutines, and performance.
- [Learn the Kotlin programming language](https://developer.android.com/kotlin/learn.md.txt): This document provides a crash course on Kotlin, covering fundamental concepts such as variable declaration, null safety, conditional statements, functions (including anonymous and higher-order functions), classes, and its interoperability with Java.
- [Kotlin Multiplatform](https://developer.android.com/kotlin/multiplatform.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Set up SQLite for KMP](https://developer.android.com/kotlin/multiplatform/sqlite.md.txt): Use the `androidx.sqlite` library for low-level SQLite database access in Kotlin Multiplatform projects.
- [Android KTX](https://developer.android.com/kotlin/ktx.md.txt): The Android KTX libraries were Kotlin extension modules for AndroidX libraries. Most extensions are part of the base modules, and you don&#39;t need the -ktx artifacts.
- [Improve app performance with Kotlin coroutines](https://developer.android.com/kotlin/coroutines/coroutines-adv.md.txt): This document provides a detailed look into Kotlin coroutines on Android, covering how to manage long-running tasks, ensure main-safety using dispatchers, start coroutines with launch and async, and understand core concepts like CoroutineScope, Job, and CoroutineContext.
- [Learn how to use Kotlin coroutines](https://developer.android.com/kotlin/coroutines/coroutines-pathway.md.txt): This document introduces Kotlin coroutines as a way to simplify asynchronous programming in Android apps, allowing for more sequential code instead of numerous callbacks.
- [Kotlin guide change log](https://developer.android.com/kotlin/guides-changelog.md.txt): This document chronicles updates, fixes, and new rules added to the Android Kotlin guides over time, covering topics like interop, style, and syntax.
- [Kotlin in Android style guide](https://developer.android.com/kotlin/style-guide.md.txt): This document defines Google&#39;s Android coding standards for Kotlin, covering formatting, naming conventions, documentation, and file structure.
- [Android Basics with Compose](https://developer.android.com/kotlin/androidbasics.md.txt): This course teaches people with no programming experience how to build simple Android apps with Jetpack Compose, covering fundamentals of programming, Kotlin basics, and using Android Studio.
- [Kotlin Developer Stories](https://developer.android.com/kotlin/stories.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Add Kotlin Multiplatform to an existing project](https://developer.android.com/kotlin/multiplatform/migrate.md.txt): This document guides you through creating a Kotlin Multiplatform shared module in Android Studio, linking it to your Android application, and configuring it for use in an iOS project with Xcode.
- [Kotlin overview](https://developer.android.com/kotlin/overview.md.txt): This document provides an overview of Kotlin, an open-source, statically-typed programming language officially supported by Google for Android development, highlighting its features, interoperability with Java, and resources for adoption.
- [Kotlin samples &nbsp;|&nbsp; Android Developers](https://developer.android.com/kotlin/samples.md.txt): Kotlin is Android's recommended programming language for modern android development.
- [Navigation Event](https://developer.android.com/kotlin/multiplatform/navigation-event.md.txt): Provides an overview of the Navigation Event KMP library and links out to more detailed documentation.
- [Build custom Gradle plugins for Android KMP](https://developer.android.com/kotlin/multiplatform/kmp-integration.md.txt): This guide helps plugin authors understand how to detect, interact with, and configure Kotlin Multiplatform (KMP) projects, focusing on Android target integration within Gradle plugins.