Android
433 bites tagged Android — interview questions with model answers, and 60-second explainers.
Purpose of safe call (`?.`) and Elvis (`?:`) operators
This tests your grasp of Kotlin's idiomatic null safety. Explain the safe call (`?.`) for chaining on nullables and the Elvis operator (`?:`) for providing defaults. Combine them in a one-line example. A multi-line `if/else` is a red flag.
Explain val, var, and null safety in Kotlin
This tests your grasp of immutability and Kotlin's compile-time null safety. Define `val` (immutable reference) vs. `var` (mutable), explain nullable types using `?`, and state the risk is `NullPointerException`. A red flag is confusing `val` with a constant.
Constraints: Building UIs with Relationships, Not Boxes
Constraints define UI by relationships, not nested boxes. Think of it like telling elements 'align with that one' instead of placing them in rigid rows. This is key for complex, responsive layouts, but can lead to unsolvable rules if not defined carefully.
WorkRequest: The Blueprint for Android Background Tasks
A WorkRequest is the blueprint for a background task in Android. It defines *what* work to do and *when*, letting WorkManager handle execution for tasks like syncing data. The footgun is putting logic in the request; it only configures, the Worker acts.
OkHttp Interceptors: Middleware for Your Network Stack
OkHttp Interceptors act as middleware for your network stack, letting you observe, modify, or short-circuit requests and responses. Use them to automatically add auth tokens or log traffic. The main footgun is order: application interceptors run once per call.
Gradle Build Scripts: The Recipe for Your App
Gradle build scripts are your app's recipe, using a declarative DSL to define dependencies and build variants. They manage libraries and create versions like debug vs. release.
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++.
ContentProvider: Android's Shared Data API
A ContentProvider is a structured API gateway for your app's private data. It lets other apps query, insert, or delete data securely without direct access. The main footgun is improper permission handling, which can leak data or cause crashes.
Kotlin's Job: A Handle to a Background Task
A Job is a handle to a coroutine, letting you manage its lifecycle. You get one from `launch` to control background tasks like network calls. The key footgun: a child's *failure* (Exception) cancels its parent, but a child's *cancellation* does not.
Kotlin Collections: Think Transformations, Not Loops
Treat collection operations as a pipeline, not a `for` loop. Each function (`map`, `filter`) transforms data and passes it to the next stage, ideal for turning API data into UI models.
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.
Android ViewManager: Bridging Native UI to React Native
A ViewManager is a factory for native Android UI. It tells React Native how to create and update a native view from JavaScript, bridging the gap between JS and native platform widgets. It's used for custom or third-party UI.
React Native Secure Storage: Using Keychain and Keystore
Use the device's native vault (Keychain/Keystore) to store secrets, not plaintext in AsyncStorage. It's for securely persisting small data like API tokens or private keys. The footgun is treating it like a general database; it's slow and for secrets only.
Google Play Testing Tracks: A Funnel for Safer Releases
Google Play testing tracks act as a release funnel, moving from internal QA to public beta to catch bugs early. Use them for initial checks (Internal), private betas (Closed), or public tests on the Play Store (Open).
Google Play: The Android App Store
Google Play is the official digital storefront for the Android ecosystem. It's the primary channel where users on certified Android and ChromeOS devices discover and download apps. A common footgun is confusing the store with the developer-facing Play Console.
Profiling React Native on Android with System Tracing
System Tracing helps you find UI jank on Android by showing where time is spent in each 16ms frame. Use it in Android Studio to diagnose stuttering animations by inspecting the UI, JS, and Native Module threads.
Local Notifications: Your App's On-Device Messenger
Local notifications are messages your app sends to itself on the user's device, no server needed. Use them for timers, reminders, or download progress. The footgun: forgetting to create Android Notification Channels will cause your alerts to fail silently.
Android Product Flavors for App Environments
Android Product Flavors let you build distinct app variants (like dev, staging, prod) from one codebase, each with its own configuration. Use this for separate builds or white-labeling.
PermissionsAndroid: Requesting Runtime Permissions
PermissionsAndroid lets you ask for sensitive permissions like camera or location at runtime. Use its `request` method to show the native Android dialog. The biggest footgun is ignoring the `NEVER_ASK_AGAIN` result, which requires sending the user to system…
React Native: Navigating Platform-Specific Shadow Styles
React Native shadow APIs expose underlying platform differences. Use the web-like `boxShadow` for cross-platform consistency or the `shadow*` props for direct native control.
Android App Signing: Your App's Digital Seal
Think of app signing as a digital seal for your Android app. It proves you are the author and the code hasn't been tampered with, a mandatory step for Google Play release. The biggest footgun is losing your private key, which locks you out of.
Flutter: Requesting Runtime Permissions
Don't assume your app has access to the camera or contacts; you must ask the user for permission at runtime. This is required for features like photo uploads or location tracking. The common footgun is forgetting to declare permissions in native config files.
Adaptive UI for Foldables: Thinking in Postures
An adaptive UI for foldables thinks in "postures," not just screen sizes, reacting to states like folded or tabletop mode. This is key for apps on devices like the Pixel Fold. The footgun is treating a foldable like a big tablet, ignoring its unique physical.
Jetpack Compose Theming for Design Systems
Compose theming uses `CompositionLocal` to implicitly pass design tokens like colors and fonts down the UI tree. This is key for building a design system where you can swap themes (like light/dark) without rewriting components.
Get Android bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.