Kotlin for Mobile Development
From your first line of Kotlin to a published Android app, with the reasoning behind every feature.
Kotlin is the language Android is written in. Google made it the preferred language for Android in 2019, and today the majority of the top thousand apps on the Play Store ship Kotlin. It runs on the Java Virtual Machine, so it can call twenty-five years of Java libraries, and it also compiles to native code for iOS and to JavaScript for the web - which is why a single Kotlin codebase can serve an Android app, an iPhone app and a website.
Overview
This course starts with no assumptions. You do not need Java, you do not need Android, and you do not need a phone. It begins with values and types, works through the object model and the collection library, spends a full level on coroutines - the thing Kotlin is genuinely famous for - and ends by building and shipping an Android app with Jetpack Compose. Every topic carries at least one worked example, and the examples build on each other rather than starting fresh each time.
Introduction
Levels one and two are the language itself: values, types, null safety, functions, classes and collections. Nothing here is Android-specific, and everything here is used on every page afterwards. Level three is where Kotlin stops looking like a tidier Java - generics, extensions, delegation, and then coroutines and flows, which are how modern Kotlin handles anything that takes time. Level four goes underneath: what a suspend function compiles to, where your code actually runs, and how to share a codebase between Android and iOS. Level five builds an Android app.
The code examples are written to be read, not just run. Each one is short enough to hold in your head and is followed by an explanation of why it is written that way rather than the obvious alternative. Type them out rather than skimming them - Kotlin has a lot of small syntactic conveniences, and they only become automatic through use.
A note on tooling. You can run every example in levels one to four at play.kotlinlang.org, which needs no installation. From level five you will want Android Studio, which is free and bundles the Kotlin compiler, the Android SDK and an emulator.
What you will be able to do
- Write idiomatic Kotlin rather than Java with different punctuation
- Use the type system to make invalid states impossible to express
- Handle concurrency with coroutines and structured concurrency
- Model data with sealed hierarchies and exhaustive when expressions
- Build an Android user interface with Jetpack Compose
- Share business logic between Android and iOS with Kotlin Multiplatform
- Test suspending code and flows without flaky timing hacks
- Publish an app to the Google Play Store
What each level covers
5 levels · 35 lessons
-
Level 1 - Basic
The language itself - values, types, null safety, functions and control flow.
7 lessons 13 min of reading
Start with Why Kotlin, and How to Run It → -
Level 2 - Intermediate
Shaping data and behaviour - classes, collections, lambdas and sealed hierarchies.
7 lessons 13 min of reading
Start with Classes, Constructors and Properties → -
Level 3 - Advanced
Generics, extensions, delegation, and the concurrency model Kotlin is known for.
7 lessons 13 min of reading
Start with Generics and Variance → -
Level 4 - Expert
The machinery underneath - what suspend compiles to, where code runs, and sharing a codebase with iOS.
7 lessons 13 min of reading
Start with How suspend Functions Actually Work → -
Level 5 - Android with Jetpack Compose
Building, wiring and shipping a real Android app with Kotlin and Compose.
7 lessons 13 min of reading
Start with An Android App's Anatomy →
Guides and articles
Longer reading about this subject, written alongside the course.
-
Kotlin Coroutines vs Threads: Understanding Concurrency in Android Development
Modern mobile applications are expected to deliver fast, responsive, and seamless user experiences. Whether an application loads information from a remote server, retrieves records from a local database, processes images, or performs background synchronization, it must handle multiple operations efficiently without affecting the user interface.
· 18 min read
Before you start
- Basic programming experience in any language
- A computer that can run a web browser
- Android Studio, from level five onwards
- Willingness to read compiler errors rather than guess
Common questions
- What does the Kotlin for Mobile Development course cover?
- It is 5 levels and 35 lessons: Level 1 - Basic; Level 2 - Intermediate; Level 3 - Advanced; Level 4 - Expert; Level 5 - Android with Jetpack Compose. Each level ends with a quiz, and the last one is an exam over the whole course.
- How long does it take?
- About 65 minutes of reading and exercises - roughly 1.1 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
- What do I need to know first?
- Basic programming experience in any language. A computer that can run a web browser. Android Studio, from level five onwards. Willingness to read compiler errors rather than guess.
- Is it free?
- Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
- What will I be able to do afterwards?
- Write idiomatic Kotlin rather than Java with different punctuation. Use the type system to make invalid states impossible to express. Handle concurrency with coroutines and structured concurrency. Model data with sealed hierarchies and exhaustive when expressions. Build an Android user interface with Jetpack Compose. Share business logic between Android and iOS with Kotlin Multiplatform. Test suspending code and flows without flaky timing hacks. Publish an app to the Google Play Store.