Skip to content
tezvyn:
Menu

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

125 bites

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

Easy everything in Android & Kotlin, page 5

easy2 min read

Deobfuscating Android Crash Stack Traces

Obfuscated crash reports are useless. Deobfuscation uses a mapping file from your build to translate stack traces back into readable code. This is vital for debugging production apps using R8/ProGuard or native C++.

Kotlin's Control Flow Expressions: `if` and `when`
easy2 min read

Kotlin's Control Flow Expressions: `if` and `when`

In Kotlin, if and when are expressions that return a value. This lets you assign their result directly to a variable, replacing Java's ternary operator. The footgun: when used as an expression, you must have an else branch to cover all cases.

easy2 min read

Google Play Content Ratings

Google Play's content rating is a mandatory maturity label for your app, like a movie rating. It's assigned by the IARC based on a questionnaire you fill out, and helps filter your app in certain regions.

easy1 min read

Android App Bundles: Ship Less Code to Users

Instead of one giant APK, an Android App Bundle (AAB) lets Google Play build a smaller, custom APK for each user's device. This standard publishing format reduces app size and speeds up installs by delivering only the necessary components.

Memory Leaks: The Silent App Killer
easy2 min read

Memory Leaks: The Silent App Killer

A memory leak is when your app holds onto objects it no longer needs, preventing memory reclamation. This often happens with static references to UI elements or background tasks. The footgun: your app won't crash immediately, but will slow down and die later.

easy2 min read

StrictMode: Your Main Thread's Watchdog

StrictMode is a developer tool that acts like a strict supervisor for your app's main thread, catching slow operations like disk or network access. It helps you find performance issues before they cause "Application Not Responding" errors.

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.

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.

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.

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.

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.

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.

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.

@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.

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.

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.

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

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.

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.

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.

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