Skip to content
tezvyn:

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

45 bites

Test yourself: Top 30 easy Android & Kotlin concepts questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Easy concepts in Android & Kotlin, page 2

Jetpack Compose Modifiers: Styling Your UI
easy2 min read

Jetpack Compose Modifiers: Styling Your UI

Think of Modifiers as a chain of instructions that style and add behavior to your UI components. They're used for everything from setting padding and size to handling clicks.

State in Jetpack Compose: The UI's Memory
easy2 min read

State in Jetpack Compose: The UI's Memory

In Compose, state is any value that can change over time. The UI is a direct function of this state; when the state updates, the UI automatically redraws (recomposes) to match. The main footgun is not "hoisting" state, which makes components hard to test.

Android's UI Layer: Displaying Data, Handling Events
easy2 min read

Android's UI Layer: Displaying Data, Handling Events

The UI layer is what users see and touch. It displays app data on screen and sends user input like taps to your business logic. It's used in every screen, from login forms to media players.

Room Entity: Your Database Table as a Kotlin Class
easy2 min read

Room Entity: Your Database Table as a Kotlin Class

A Room Entity is a data class that maps to a database table; each object is a row, each property a column. Use it to define your local SQLite schema in Android. The footgun: forgetting the @PrimaryKey annotation, which is required for Room to manage.

Room DAO: Your App's Type-Safe SQL Interface
easy2 min read

Room DAO: Your App's Type-Safe SQL Interface

A Room DAO is an interface that translates your method calls into SQL queries. It's how your Android app's code talks to its local database without writing boilerplate. The footgun is putting business logic in a DAO; it should only access data.

easy2 min read

Room Database: SQL Made Simple on Android

Room is an abstraction layer over SQLite that lets you work with Kotlin/Java objects, not raw SQL. It's the standard for local data persistence in Android, like caching network data.

Preferences DataStore: The Safe SharedPreferences
easy2 min read

Preferences DataStore: The Safe SharedPreferences

Preferences DataStore is Android's modern way to save simple key-value data. It uses Kotlin's Flow to read data asynchronously, preventing UI freezes. Use it for user settings, but remember you can't read values synchronously like with SharedPreferences.

easy2 min read

REST: The Architectural Style for Web APIs

REST is the architectural style for web APIs, using standard HTTP methods like GET and POST to manage data. Your Android app uses it to fetch user profiles from a server. The footgun is treating REST as a strict protocol; it's a set of guidelines.

easy2 min read

Retrofit: Turn Your HTTP API into an Interface

Retrofit turns your HTTP API into a simple interface, letting you define network calls as annotated methods. It's the standard for most Android network tasks. Footgun: forgetting to run calls off the main thread will crash your app.

Kotlinx.serialization: Kotlin's Native Data Converter
easy2 min read

Kotlinx.serialization: Kotlin's Native Data Converter

Kotlinx.serialization is Kotlin's native way to convert data classes into formats like JSON. It uses a compiler plugin to automate the process, making it ideal for API calls or saving data.

easy2 min read

OkHttp: A Smarter HTTP Client for Your App

OkHttp is a smart, resilient HTTP client for Android and Java. It automatically handles complexities like connection pooling, caching, and GZIP compression to make requests faster and more reliable.

Dependency Injection: Your Objects Shouldn't Create Their Own Helpers
easy2 min read

Dependency Injection: Your Objects Shouldn't Create Their Own Helpers

Instead of creating its own helpers (like a network client), an object receives them from an outside source. This is crucial for building testable Android apps, as it lets you swap a real UserRepository with a fake one during tests.

@HiltAndroidApp: The Entry Point for Hilt DI
easy1 min read

@HiltAndroidApp: The Entry Point for Hilt DI

@HiltAndroidApp is the main power switch for Hilt dependency injection. You place it on your Application class to trigger code generation and create the top-level dependency container.

Threads: Your App's Second Pair of Hands
easy2 min read

Threads: Your App's Second Pair of Hands

A thread is a separate path of execution for background work, keeping your app's UI responsive. It's used for long tasks like network calls or disk I/O. The main footgun is trying to update the UI from a background thread, which will crash your app.

easy2 min read

AsyncTask: The Deprecated Way to Do Background Work

AsyncTask was Android's original tool for short background tasks that update the UI. It was used for simple network requests or disk I/O. It's fully deprecated due to memory leaks and lifecycle issues; use Kotlin Coroutines instead.

easy2 min read

IntentService: Queued Background Work (Deprecated)

IntentService was a simple tool for running background tasks sequentially. You sent it work as an Intent, it processed it on a worker thread, and shut down when done. It's now deprecated; use WorkManager for modern background jobs.

The Testing Pyramid: Fast Feedback, Low Cost
easy2 min read

The Testing Pyramid: Fast Feedback, Low Cost

The Testing Pyramid guides test suite structure: a wide base of fast unit tests, a smaller middle of integration tests, and a tiny top of slow UI tests. This model is key for Android's local, instrumented, and UI tests. The footgun is inverting it.

JUnit on Android: Fast, Local Unit Tests
easy2 min read

JUnit on Android: Fast, Local Unit Tests

JUnit on Android runs tests directly on your local machine's JVM, not a device, making them extremely fast. Use it for business logic and ViewModels that don't touch Android APIs. The footgun is trying to access framework code like Context, which will fail.

easy2 min read

Truth: Fluent Assertions for Clearer Tests

Truth makes tests read like English: assertThat(actual).is.... It provides clearer assertions than standard JUnit, with far more helpful failure messages, especially for collections. The main footgun is a potential Guava dependency conflict.

Instrumentation Tests: Testing on a Real Android Device
easy2 min read

Instrumentation Tests: Testing on a Real Android Device

Instrumentation tests are like test-driving your app on a real device or emulator. They verify code that depends on the Android framework, like UI interactions or sensor access.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles