tezvyn:

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

243 bites

Android & Kotlin30 sec read

Unify Android EventBus and RxJava with Kotlin Flow

Mixing EventBus, RxJava, and Kotlin Flow in Android codebases creates memory leaks and GC pressure from stream wrapping. Operator translation and lifecycle mismatches drive engineering debt.

Android & Kotlin30 sec read

isCoreLibraryDesugaringEnabled Nears End of Life

isCoreLibraryDesugaringEnabled and desugar_jdk_libs 2.1.3 are being phased out as Google modularizes Android system updates, ending the j$ namespace workaround for java.time on legacy devices.

Android & Kotlin30 sec read

Kotlin 2.4.0 Preview, Unified Toolchain, and LSP Alpha Land

Kotlin 2.4.0 stabilizes context parameters and explicit backing fields. A new Kotlin Toolchain unifies build, test, and agent workflows under one command, while the Language Server hits Alpha.

Android & Kotlin30 sec read

Koog 1.0 Stabilizes Kotlin AI Agent Framework

Koog 1.0 locks APIs for one year in JetBrains' Kotlin AI agent framework, adding local Android LiteRT inference and OpenTelemetry. JVM teams can build production agents without breaking changes. Adopt stable core first, then add beta features as needed.

Android & Kotlin30 sec read

Kotlin 2.4.0 ships Swift package support and Java 26

Kotlin 2.4.0 adds Swift package dependencies for Native, Java 26 for JVM, and WebAssembly Component Model. Multiplatform teams can consume Swift libraries directly and target newer Java. Upgrade via IntelliJ IDEA, Android Studio, or Gradle.

Android & Kotlin30 sec read

Architect periodic and on-demand sync with WorkManager

Tests combining periodic and push WorkManager requests safely. Outline: one Worker class, PeriodicWorkRequest hourly and OneTimeWorkRequest on push, with ExistingWorkPolicy.KEEP plus constraints. Red flag: two Workers, no deduplication, or ForegroundService.

Android & Kotlin30 sec read

How would you implement a constrained photo upload with WorkManager?

Tests knowledge of WorkManager constraints and retry policies for deferrable background uploads. A strong answer names OneTimeWorkRequest with Constraints for charging and unmetered network, plus BackoffPolicy for retry.

Android & Kotlin30 sec read

Create a custom View from scratch that draws a shape

This tests Android View measurement and drawing contracts. A strong answer covers: onMeasure resolves dimensions against parent MeasureSpec; onDraw renders with Canvas and Paint; constructors parse attributes.

Android & Kotlin30 sec read

Roles of minifyEnabled and shrinkResources and common pitfalls

Tests R8 code shrinking vs resource stripping and runtime risks. Outline: minifyEnabled shrinks code; shrinkResources removes unused assets and requires minifyEnabled; dynamic access like getIdentifier() crashes; keep resources with tools:keep or keep.xml.

Android & Kotlin30 sec read

Chain WorkManager tasks and pass a file URI between workers.

This tests WorkManager chaining and data passing. A strong answer chains Download, Unzip, and Process with WorkContinuation, passes URI via outputData, and reads it with inputData. A red flag is suggesting global state, SharedPreferences, or thread blocking.

Android & Kotlin30 sec read

OneTimeWorkRequest vs PeriodicWorkRequest and minimum repeat interval

Tests WorkManager scheduling constraints and battery tradeoffs. Contrast one-shot chaining with non-chained periodic work, cite the 15-minute minimum, and tie it to system batching under Doze and App Standby. Red flag: claiming exact intervals or no minimum.

Android & Kotlin30 sec read

How do you diagnose and optimize a slow Room query?

Tests SQLite profiling and Room optimization. Isolate the query with Database Inspector, run EXPLAIN QUERY PLAN to spot scans, then add covering indexes, rewrite joins, or use Paging3. Red flag: blindly adding indexes or switching to NoSQL without measuring.

Android & Kotlin30 sec read

Explain touch event dispatch in a ViewGroup with a clickable child

It tests touch routing through the three key methods. A strong answer traces ACTION_DOWN from root to target, notes intercepting halts child delivery, and onTouchEvent true consumes while false bubbles up.

Android & Kotlin30 sec read

How do include, merge, and ViewStub optimize deep layout nesting?

This tests Android view inflation and hierarchy flattening. A strong answer covers include for reuse, merge to strip redundant parents during inflation, and ViewStub for lazy-loading heavy views. A red flag is conflating them or citing XML brevity alone.

Android & Kotlin30 sec read

What are RecyclerView.Adapter and ViewHolder, and why do they improve scrolling?

This tests RecyclerView's data-to-view separation. A strong answer says Adapter binds data while ViewHolder caches findViewById results, avoiding hierarchy scans on scroll. A red flag is calling ViewHolder a memory saver instead of a lookup cache.

Android & Kotlin30 sec read

How does App Bundle handle ABI splits versus multi-APK?

Tests dynamic delivery of native libs: AAB auto-generates per-ABI config splits, but multi-APK requires manual APK builds per ABI. Misconfiguration ships unused .so bloat or crashes on unsupported devices. Red flag: calling AAB a simple multi-APK zip.

Android & Kotlin30 sec read

Write the ProGuard keep rule to fix reflection after R8

This tests R8 dead-code removal and exact ProGuard syntax for reflective constructors. A strong answer gives -keep class com.example.T { <init>(...); } because R8 cannot trace dynamic class names. Broad -keep rules or omitting constructor are red flags.

Android & Kotlin30 sec read

Describe Hilt's component hierarchy and scope injection rules

Tests whether you understand Hilt's generated component tree and scoping rules. A strong answer lists the hierarchy, explains parent-outlives-child semantics, and states that ActivityScoped-into-Singleton injection fails at compile time.

Android & Kotlin30 sec read

Functional difference between @Binds and @Provides in Hilt

Tests if you understand Hilt code generation tradeoffs. @Binds wires an existing injectable implementation to an interface with less overhead; @Provides constructs instances manually.

Android & Kotlin30 sec read

Explain Retrofit Interceptors and write a static API key interceptor

Tests OkHttp interception and application versus network scope. Strong answers build a new request adding X-Api-Key via newBuilder and chain.proceed; contrast addInterceptor once versus addNetworkInterceptor per hop.

Android & Kotlin · Tezvyn