Jetpack Compose Tutorial #19: Permissions and Camera

Your app needs the camera. Or the user’s location. Or access to files. On Android, you can’t just use these — you need to ask permission first. In the old View system, permissions required complex boilerplate with onRequestPermissionsResult. In Compose, it’s much simpler — a few lines with rememberLauncherForActivityResult or the Accompanist library. Two Ways to Handle Permissions Approach Library Best For Activity Result API Built-in (no extra dependency) Simple, single permission Accompanist Permissions accompanist-permissions Multiple permissions, complex flows Both work well. Activity Result API is simpler. Accompanist gives more control. ...

March 25, 2026 · 6 min

Jetpack Compose UI Testing: performScrollTo, performScrollToNode & Gestures

Your app works when you manually tap through it. But does it work after your next code change? And the one after that? Manual testing doesn’t scale. You can’t tap through 50 screens after every change. That is what automated tests are for — and Compose makes testing surprisingly easy. Why Test Compose UI? Three reasons: Catch bugs before users do — tests run in seconds, not minutes of manual tapping Refactor with confidence — change code, run tests, know nothing broke Document behavior — tests show WHAT the UI should do Setup Add the testing dependencies to app/build.gradle.kts: ...

March 24, 2026 · 9 min

Jetpack Compose Tutorial #17: Performance — Making Your App Fast

Your app works. But it stutters when scrolling. The screen freezes for a split second when you type. Animations aren’t smooth. The problem isn’t Compose — it’s recomposition. Compose redraws parts of your UI when state changes. If it redraws too much, too often, your app feels slow. This tutorial will teach you why Compose gets slow and how to fix it. How Recomposition Works When state changes, Compose doesn’t redraw the entire screen. It redraws only the Composables that read the changed state. This is called recomposition. ...

March 24, 2026 · 9 min

Jetpack Compose Tutorial #16: Custom Layouts and Canvas — Drawing Your Own Components

Sometimes Column, Row, and Box are not enough. You need a circular progress bar. A custom chart. A drawing canvas. A shape that doesn’t exist in Material Design. That is when you use Canvas — Compose’s drawing API that lets you draw anything pixel by pixel. What is Canvas? Canvas is a Composable that gives you a blank area to draw on. You can draw shapes, lines, arcs, text — anything. ...

March 24, 2026 · 7 min

Jetpack Compose Tutorial #15: Animations — Make Your UI Feel Alive

Your app works. But it feels flat. Buttons appear instantly. Screens switch without transition. Content pops in and out like a slideshow from 2005. Animations fix that. They make your app feel smooth, polished, and alive — like a well-made product instead of a homework assignment. The good news: Compose makes animations surprisingly easy. You can add most animations with a single line of code. The Animation API at a Glance Compose has several animation APIs, each for a different use case: ...

March 24, 2026 · 9 min

Jetpack Compose Tutorial #14: Dependency Injection with Hilt

In the previous tutorials, we created databases and ViewModels manually. We wrote DatabaseProvider singletons. We passed dependencies by hand. It worked — but it doesn’t scale. When your app has 10 ViewModels, 5 repositories, 3 data sources, and a database — wiring everything manually becomes a nightmare. One missing connection and your app crashes. Hilt fixes this. You add annotations to your classes, and Hilt connects everything automatically. What is Dependency Injection? Dependency injection (DI) means: instead of a class creating its own dependencies, someone else provides them. ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #13: Room Database — Saving Data Locally

Your app loads data from an API. But what happens when the user has no internet? The screen goes blank. Room database fixes this. It saves data on the device so your app works offline. And it integrates perfectly with Compose — when data changes in the database, the UI updates automatically. What is Room? Room is Google’s database library for Android. It sits on top of SQLite and gives you a clean Kotlin API instead of raw SQL. ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #12: Retrofit — Loading Data from APIs

Every real app needs data from the internet. A weather app calls a weather API. A social app loads posts from a server. A store app fetches products from a backend. Retrofit is the most popular library for making HTTP requests in Android. In this tutorial, you will learn how to use it with Compose to build a screen that loads, displays, and handles errors from a real API. What is Retrofit? Retrofit is an HTTP client library by Square. It turns your API into a Kotlin interface: ...

March 23, 2026 · 7 min

Jetpack Compose Tutorial #11: Side Effects — LaunchedEffect and Friends

Compose has one rule: Composable functions should be pure. They take state in and produce UI out. No database calls. No API requests. No timers. No logging. But real apps need those things. You need to start a timer when a screen opens. You need to load data when an ID changes. You need to clean up a listener when a screen closes. That is what side effects are for. They let you safely run “impure” code inside Compose. ...

March 23, 2026 · 9 min

Kotlin Tutorial #25: Testing in Kotlin — JUnit 5, MockK, and Best Practices

In the previous tutorial, you built a REST API with Ktor. Now let’s learn about testing. Good tests make your code reliable and give you confidence to refactor. In this tutorial, you will learn how to write tests in Kotlin using JUnit 5 and MockK. In this tutorial, you will learn: JUnit 5 basics (@Test, @BeforeEach, @Nested) Assertions (assertEquals, assertTrue, assertThrows) Parameterized tests (@ParameterizedTest, @ValueSource, @CsvSource) MockK (mock, every, verify) Argument capture and verification order Testing coroutines with runTest Test organization and best practices Setting Up Add MockK and coroutines-test to your build.gradle.kts: ...

March 22, 2026 · 8 min