{"slug":"android-dev","title":"android-dev","summary":"Production-grade Android app development guide covering native (Kotlin/Java), cross-platform (Flutter, RN, KMM), and hybrid architectures.","platform":"ChatGPT","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-17T11:41:23.687424Z","repo":{"url":"https://github.com/sickn33/agentic-awesome-skills","stars":46883,"forks":6831,"license":"MIT","updatedAt":"2026-09-25T05:43:16Z"},"bodyHtml":"<hr>\n<h2>name: android-dev\ndescription: \"Production-grade Android app development guide covering native (Kotlin/Java), cross-platform (Flutter, RN, KMM), and hybrid architectures.\"\nrisk: safe\nsource: community\ndate_added: \"2026-06-08\"</h2>\n<h1>Android App Development Skill</h1>\n<h2>Overview</h2>\n<p>This skill guides production-grade Android and cross-platform (non-iOS) app development following practices used at big tech companies. It covers the entire development lifecycle — architecture, UI, code quality, testing, error handling, release, and maintenance.</p>\n<h2>When to Use This Skill</h2>\n<ul>\n<li>Use when deciding on a tech stack (see §1 Stack Selection)</li>\n<li>Use when setting up project architecture (see §2 Architecture)</li>\n<li>Use when designing UI, screens, or a design system (see §3 UI &amp; Design)</li>\n<li>Use when ensuring code quality, patterns, or APIs (see Best Practices)</li>\n<li>Use when implementing error handling or debugging crashes (see §5 Error Handling)</li>\n<li>Use when planning testing strategy (see §6 Testing)</li>\n<li>Use when configuring build, CI/CD, or release pipelines (see §7 Build &amp; Release)</li>\n<li>Use when optimizing performance or memory (see §8 Performance)</li>\n<li>Use when debugging or fixing bugs (see §9 Debugging)</li>\n<li>Use when following the full development roadmap (see §10 Development Roadmap)</li>\n<li>Use when needing deep reference for a stack (see <code>references/</code> directory)</li>\n</ul>\n<hr>\n<h2>§1 Stack Selection</h2>\n<p>Choose based on team, requirements, and platform targets. <strong>Do not recommend iOS-specific paths.</strong></p>\n<h3>Native Android — Kotlin + Jetpack Compose</h3>\n<p><strong>Best for:</strong> Android-only apps, hardware-intensive features, best-in-class UX, new projects.</p>\n<ul>\n<li>Language: <strong>Kotlin</strong></li>\n<li>UI: <strong>Jetpack Compose</strong> (modern declarative UI)</li>\n<li>Key libs: Room, Retrofit/Ktor, Hilt, WorkManager, DataStore, Navigation Compose</li>\n<li>Reference: <code>references/native-android.md</code></li>\n</ul>\n<h3>Native Android — Java + XML Views</h3>\n<p><strong>Best for:</strong> Existing Java codebases, teams without Kotlin experience, legacy app maintenance, incremental Kotlin migration.</p>\n<ul>\n<li>Language: <strong>Java</strong> (fully supported by Google, not deprecated)</li>\n<li>UI: <strong>XML Layouts</strong> (ConstraintLayout, RecyclerView, ViewBinding)</li>\n<li>Key libs: Room, Retrofit, Hilt, WorkManager, LiveData, ViewModel</li>\n<li>Java and Kotlin <strong>coexist seamlessly</strong> in the same project — migrate incrementally</li>\n<li>Reference: <code>references/java-android.md</code></li>\n</ul>\n<h3>Flutter (Dart)</h3>\n<p><strong>Best for:</strong> Android + Web (+ desktop) from one codebase, fast iteration, pixel-perfect custom UI.</p>\n<ul>\n<li>Language: <strong>Dart</strong></li>\n<li>UI: Flutter Widget tree (Material 3 / Cupertino widgets available but target Material for Android)</li>\n<li>Key libs: Provider/Riverpod/Bloc, Dio, Drift/Isar, go_router, flutter_local_notifications</li>\n<li>Reference: <code>references/flutter.md</code></li>\n</ul>\n<h3>React Native (JavaScript/TypeScript)</h3>\n<p><strong>Best for:</strong> Web + Android code sharing, JS/TS teams, rich ecosystem.</p>\n<ul>\n<li>Language: <strong>TypeScript</strong> (preferred)</li>\n<li>UI: React Native core components + NativeWind / React Native Paper</li>\n<li>Key libs: React Navigation, Zustand/Redux Toolkit, React Query, MMKV</li>\n<li>Reference: <code>references/react-native.md</code></li>\n</ul>\n<h3>Kotlin Multiplatform (KMM / Compose Multiplatform)</h3>\n<p><strong>Best for:</strong> Sharing business logic across Android + Desktop + Web while keeping native Android UI.</p>\n<ul>\n<li>Language: <strong>Kotlin</strong> everywhere</li>\n<li>UI: Native Compose on Android; Compose Multiplatform for shared UI</li>\n<li>Key libs: Ktor, SQLDelight, Koin, kotlinx.serialization, Napier</li>\n<li>Reference: <code>references/kmm.md</code></li>\n</ul>\n<h3>Hybrid (Capacitor / Ionic)</h3>\n<p><strong>Best for:</strong> Web-first teams, simple apps, PWA-like content apps.</p>\n<ul>\n<li>Language: TypeScript + HTML/CSS</li>\n<li>UI: Ionic components or custom web UI</li>\n<li>Avoid for: Heavy animations, native sensor access, high-performance games</li>\n<li>Reference: <code>references/hybrid.md</code></li>\n</ul>\n<h3>Decision Matrix</h3>\n<table>\n<thead>\n<tr>\n<th>Requirement</th>\n<th>Native Kotlin</th>\n<th>Native Java</th>\n<th>Flutter</th>\n<th>RN</th>\n<th>KMM</th>\n<th>Hybrid</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Android-only (new)</td>\n<td>✅ Best</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅</td>\n</tr>\n<tr>\n<td>Android-only (existing Java)</td>\n<td>⚠️ migrate</td>\n<td>✅ Best</td>\n<td>❌</td>\n<td>❌</td>\n<td>⚠️</td>\n<td>❌</td>\n</tr>\n<tr>\n<td>Android + Web</td>\n<td>❌</td>\n<td>❌</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅ Best</td>\n</tr>\n<tr>\n<td>Android + Desktop</td>\n<td>❌</td>\n<td>❌</td>\n<td>✅</td>\n<td>⚠️</td>\n<td>✅</td>\n<td>⚠️</td>\n</tr>\n<tr>\n<td>Shared business logic only</td>\n<td>N/A</td>\n<td>N/A</td>\n<td>N/A</td>\n<td>N/A</td>\n<td>✅ Best</td>\n<td>N/A</td>\n</tr>\n<tr>\n<td>Native performance</td>\n<td>✅</td>\n<td>✅</td>\n<td>✅</td>\n<td>⚠️</td>\n<td>✅</td>\n<td>❌</td>\n</tr>\n<tr>\n<td>JS/TS team</td>\n<td>❌</td>\n<td>❌</td>\n<td>❌</td>\n<td>✅ Best</td>\n<td>❌</td>\n<td>✅</td>\n</tr>\n<tr>\n<td>Custom pixel-perfect UI</td>\n<td>✅</td>\n<td>⚠️</td>\n<td>✅ Best</td>\n<td>⚠️</td>\n<td>✅</td>\n<td>❌</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>§2 Architecture</h2>\n<h3>Core Principle: Separation of Concerns</h3>\n<p>Every production Android project must separate <strong>UI</strong>, <strong>business logic</strong>, and <strong>data</strong> into distinct, independently testable layers.</p>\n<h3>Recommended Architecture: Clean Architecture + MVI/MVVM</h3>\n<pre><code>app/\n├── ui/              # Composables / Activities / Fragments / Screen states\n├── presentation/    # ViewModels, UI State, UI Events\n├── domain/          # Use cases, domain models, repository interfaces\n├── data/            # Repository impl, remote (API), local (DB), mappers\n└── di/              # Dependency injection modules\n</code></pre>\n<p><strong>Data flow (unidirectional):</strong></p>\n<pre><code>User Action → ViewModel/Store → Use Case → Repository → Data Source\n                    ↓\n             UI State (sealed class / StateFlow)\n                    ↓\n             Composable / View renders state\n</code></pre>\n<h3>Key Architecture Patterns by Stack</h3>\n<p><strong>Native (MVVM + MVI):</strong></p>\n<ul>\n<li><code>StateFlow</code> / <code>SharedFlow</code> for reactive state</li>\n<li><code>sealed class UiState</code> + <code>sealed class UiEvent</code></li>\n<li>Hilt for DI, coroutines + Flow for async</li>\n<li>Repository pattern wrapping Room + Retrofit</li>\n</ul>\n<p><strong>Flutter (BLoC or Riverpod):</strong></p>\n<ul>\n<li><code>Bloc</code> or <code>Cubit</code> for business logic isolation</li>\n<li><code>AsyncNotifierProvider</code> (Riverpod) for data + state</li>\n<li>Repositories as abstract classes with impl injected</li>\n</ul>\n<p><strong>React Native (Redux Toolkit or Zustand):</strong></p>\n<ul>\n<li>RTK Query or React Query for server state</li>\n<li>Zustand slices for client state</li>\n<li>Custom hooks to encapsulate business logic per feature</li>\n</ul>\n<p><strong>KMM:</strong></p>\n<ul>\n<li>Shared <code>commonMain</code> holds domain + data layers</li>\n<li><code>expect/actual</code> for platform-specific implementations</li>\n<li>Kotlin coroutines + Flow bridged to platform (StateFlow on Android)</li>\n</ul>\n<h3>Module Structure (Multi-module for large apps)</h3>\n<pre><code>:app            # Entry point, DI wiring\n:core:ui        # Design system, shared composables\n:core:network   # API client, interceptors\n:core:database  # Room / SQLDelight setup\n:feature:home\n:feature:profile\n:feature:settings\n</code></pre>\n<hr>\n<h2>§3 UI &amp; Design</h2>\n<h3>Design System First</h3>\n<p>Before writing screens, define:</p>\n<ol>\n<li><strong>Color tokens</strong> — Primary, secondary, surface, on-surface, error; light + dark variants</li>\n<li><strong>Typography scale</strong> — Display, headline, title, body, label (Material 3 type system)</li>\n<li><strong>Spacing scale</strong> — 4dp grid system (4, 8, 12, 16, 24, 32, 48dp)</li>\n<li><strong>Shape tokens</strong> — Corner radii per component family</li>\n<li><strong>Component library</strong> — Button, TextField, Card, BottomSheet, TopAppBar, etc.</li>\n</ol>\n<h3>Jetpack Compose UI Rules</h3>\n<ul>\n<li>Use <code>MaterialTheme</code> tokens; never hardcode colors/dimensions</li>\n<li><code>CompositionLocal</code> for theme, locale, haptics</li>\n<li><code>remember</code> / <code>rememberSaveable</code> correctly (saveable for UI state surviving rotation)</li>\n<li>Extract large composables into sub-composables; each function ≤ 80 lines</li>\n<li>Use <code>LazyColumn</code>/<code>LazyVerticalGrid</code> for lists; never <code>Column</code> with forEach for large data</li>\n<li>Side effects only in <code>LaunchedEffect</code>, <code>DisposableEffect</code>, <code>SideEffect</code></li>\n<li>Avoid state hoisting anti-patterns: hoist state to the lowest common ancestor</li>\n</ul>\n<h3>Accessibility (Non-Negotiable)</h3>\n<ul>\n<li>All interactive elements: <code>contentDescription</code> or <code>semantics { }</code></li>\n<li>Min touch target: <strong>48×48dp</strong></li>\n<li><code>TalkBack</code> compatibility tested before every release</li>\n<li>Dynamic text size support (<code>sp</code> not <code>dp</code> for text)</li>\n<li>Color contrast ratio ≥ 4.5:1 (WCAG AA)</li>\n</ul>\n<h3>Navigation</h3>\n<ul>\n<li><strong>Native:</strong> Navigation Compose with typed <code>NavHost</code> and <code>SafeArgs</code> equivalent</li>\n<li><strong>Flutter:</strong> <code>go_router</code> with named routes and guards</li>\n<li><strong>RN:</strong> React Navigation v7 with typed <code>NavigationProp</code></li>\n<li>Deep link handling registered for every screen that can be externally opened</li>\n<li>Back stack managed deliberately — don't push duplicates, use <code>popUpTo</code> / <code>launchSingleTop</code></li>\n</ul>\n<h3>Responsive &amp; Adaptive UI</h3>\n<ul>\n<li>Support all screen sizes: phones, foldables, tablets (<code>WindowSizeClass</code>)</li>\n<li>Test at 320dp, 360dp, 411dp, 600dp+, 840dp+ widths</li>\n<li>Foldable hinge awareness via <code>WindowInfoTracker</code></li>\n<li>Edge-to-edge display + <code>WindowInsets</code> handling required for Android 15+</li>\n</ul>\n<hr>\n<h2>Best Practices</h2>\n<h3>Language Standards</h3>\n<p><strong>Kotlin:</strong></p>\n<ul>\n<li>Prefer <code>data class</code>, <code>sealed class</code>, <code>object</code>, <code>enum class</code> appropriately</li>\n<li>No <code>!!</code> null assertions — use <code>?.let</code>, <code>?: return</code>, <code>requireNotNull</code> with message</li>\n<li>Coroutines: always specify <code>CoroutineScope</code> + <code>Dispatcher</code> explicitly; never <code>GlobalScope</code></li>\n<li>Use <code>@Stable</code> / <code>@Immutable</code> on Compose state classes for smart recomposition</li>\n</ul>\n<p><strong>Java:</strong></p>\n<ul>\n<li><code>@NonNull</code> / <code>@Nullable</code> annotations on every method param and return type</li>\n<li>Never call methods on unchecked objects — null-check explicitly or use <code>Objects.requireNonNull</code></li>\n<li>Always null <code>binding</code> reference in Fragment's <code>onDestroyView()</code> to prevent memory leaks</li>\n<li>Use <code>ExecutorService</code> (not <code>AsyncTask</code> — deprecated) for background work; or <code>LiveData</code> + Room's built-in threading</li>\n<li>Prefer <code>ListAdapter</code> + <code>DiffUtil</code> over manual <code>notifyDataSetChanged()</code> in RecyclerView</li>\n<li>Use <code>ViewBinding</code> — never <code>findViewById</code></li>\n</ul>\n<p><strong>Dart (Flutter):</strong></p>\n<ul>\n<li>Null safety required — no <code>!</code> without explicit null check above</li>\n<li>Immutable state objects with <code>copyWith</code></li>\n<li><code>const</code> constructors on all stateless widgets</li>\n</ul>\n<p><strong>TypeScript (RN):</strong></p>\n<ul>\n<li><code>strict: true</code> in tsconfig always</li>\n<li>Zod or io-ts for runtime type validation of API responses</li>\n<li>No <code>any</code> — use <code>unknown</code> and narrow</li>\n</ul>\n<h3>Dependency Management</h3>\n<ul>\n<li>Pin all dependency versions in <code>build.gradle.kts</code> / <code>pubspec.yaml</code> / <code>package.json</code></li>\n<li>Audit dependencies monthly for security vulnerabilities</li>\n<li>Avoid transitive dependency conflicts — use dependency resolution strategies</li>\n<li>Keep dependency count minimal — every added lib is a maintenance burden</li>\n</ul>\n<h3>Code Review Checklist (PR gate)</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> New public APIs have KDoc / DartDoc / JSDoc</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> No hardcoded strings — use string resources / l10n</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> No hardcoded dimensions or colors outside design tokens</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> No blocking I/O on main thread</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> No memory leaks (no <code>Activity</code> context stored in singletons)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Coroutine scopes / streams properly cancelled / disposed</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Feature flag guarding any non-trivial feature</li>\n</ul>\n<hr>\n<h2>§5 Error Handling</h2>\n<h3>The Golden Rule</h3>\n<p><strong>Never let exceptions propagate to the user silently or crash the app.</strong></p>\n<h3>Error Classification</h3>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Strategy</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Network errors</td>\n<td>Retry with exponential backoff; show retry UI</td>\n</tr>\n<tr>\n<td>Auth errors (401/403)</td>\n<td>Refresh token → re-request → logout if fails</td>\n</tr>\n<tr>\n<td>Validation errors</td>\n<td>Show inline field errors immediately</td>\n</tr>\n<tr>\n<td>Data parsing errors</td>\n<td>Log + fallback to cached/default state</td>\n</tr>\n<tr>\n<td>Unexpected crashes</td>\n<td>Catch at top-level; show error screen + report</td>\n</tr>\n<tr>\n<td>Background task failures</td>\n<td>Retry via WorkManager; notify user if critical</td>\n</tr>\n</tbody>\n</table>\n<h3>Result / Either Pattern (Kotlin)</h3>\n<pre><code>sealed class AppResult&lt;out T&gt; {\n    data class Success&lt;T&gt;(val data: T) : AppResult&lt;T&gt;()\n    data class Error(val exception: AppException) : AppResult&lt;Nothing&gt;()\n}\n\nsealed class AppException(msg: String) : Exception(msg) {\n    class NetworkException(msg: String) : AppException(msg)\n    class AuthException(msg: String) : AppException(msg)\n    class ParseException(msg: String) : AppException(msg)\n    class UnknownException(msg: String) : AppException(msg)\n}\n</code></pre>\n<p>Use <code>AppResult&lt;T&gt;</code> as return type for all repository + use case functions. ViewModels map to <code>UiState.Error</code>.</p>\n<h3>Crash Reporting</h3>\n<ul>\n<li>Integrate <strong>Firebase Crashlytics</strong> or <strong>Sentry</strong> from day one</li>\n<li>Set user identifiers and custom keys before crash occurs</li>\n<li>Non-fatal exceptions logged for all caught errors</li>\n<li>ANR monitoring enabled</li>\n<li>Crash-free sessions target: <strong>≥ 99.5%</strong></li>\n</ul>\n<h3>Offline / Network Resilience</h3>\n<ul>\n<li>Cache-first strategy: show stale data, fetch fresh in background</li>\n<li><code>Room</code> / <code>Drift</code> / <code>MMKV</code> as single source of truth</li>\n<li>Expose network state via <code>ConnectivityManager</code> and reflect in UI</li>\n<li>All network calls wrapped with timeout + retry policy</li>\n</ul>\n<hr>\n<h2>§6 Testing</h2>\n<h3>Testing Pyramid</h3>\n<pre><code>         /\\\n        /E2E\\        ← 10%  (UI tests: Espresso, Maestro, Appium)\n       /------\\\n      / Integr \\     ← 20%  (Repository, DB, API contract tests)\n     /----------\\\n    /    Unit    \\   ← 70%  (ViewModels, Use Cases, Utilities)\n   /--------------\\\n</code></pre>\n<h3>Unit Tests (70%)</h3>\n<ul>\n<li>Every ViewModel, UseCase, Repository, Mapper tested</li>\n<li><strong>Native:</strong> JUnit5 + MockK + Turbine (Flow testing) + Kotest assertions</li>\n<li><strong>Flutter:</strong> <code>flutter_test</code> + <code>mocktail</code></li>\n<li><strong>RN:</strong> Jest + <code>@testing-library/react-native</code> + <code>msw</code> for API mocking</li>\n<li>Coverage target: <strong>≥ 80%</strong> on domain + presentation layers</li>\n</ul>\n<h3>Integration Tests (20%)</h3>\n<ul>\n<li>Room DB tests with in-memory database</li>\n<li>Retrofit/Ktor tests with <code>MockWebServer</code> (OkHttp)</li>\n<li>Repository tests verifying cache + remote coordination</li>\n<li>API contract tests against real staging endpoint</li>\n</ul>\n<h3>UI / E2E Tests (10%)</h3>\n<ul>\n<li><strong>Espresso</strong> for critical user journeys (login, checkout, core action)</li>\n<li><strong>Maestro</strong> for cross-platform E2E flows (recommended for Flutter + RN too)</li>\n<li>Run on real device farm (Firebase Test Lab / BrowserStack) before release</li>\n<li>Smoke test suite runs on every PR; full E2E suite nightly</li>\n</ul>\n<h3>Test Data Management</h3>\n<ul>\n<li>Use factories / builders for test data, never copy-paste objects</li>\n<li>Hermetic tests: never share mutable state between test cases</li>\n<li>Fakes over mocks for complex dependencies (repositories, data sources)</li>\n</ul>\n<hr>\n<h2>§7 Build &amp; Release</h2>\n<h3>Build Variants</h3>\n<pre><code>debug       → dev API, logging on, no minification, debuggable\nstaging     → staging API, logging on, minified, not debuggable\nrelease     → prod API, logging off, minified, signed\n</code></pre>\n<h3>Gradle Best Practices (Native)</h3>\n<ul>\n<li><code>build.gradle.kts</code> only — no Groovy DSL in new projects</li>\n<li>Version catalog (<code>libs.versions.toml</code>) for all dependency versions</li>\n<li><code>buildConfig</code> for environment-specific constants</li>\n<li>Baseline profiles for startup performance</li>\n<li>R8 full mode enabled in release; maintain proguard rules in version control</li>\n</ul>\n<h3>CI/CD Pipeline</h3>\n<pre><code>PR Opened\n  └─ lint + unit tests + build debug APK          [&lt; 5 min]\n\nMerge to main\n  └─ unit + integration tests + staging build     [&lt; 15 min]\n  └─ deploy to Firebase App Distribution (QA)\n\nRelease tag\n  └─ full test suite + E2E on device farm         [&lt; 45 min]\n  └─ build release AAB\n  └─ upload to Play Console (internal track)\n  └─ promote: internal → closed testing → open → production\n</code></pre>\n<p><strong>Recommended CI:</strong> GitHub Actions, Bitrise, or CircleCI.</p>\n<h3>Play Store Release Strategy</h3>\n<ul>\n<li>Always release to <strong>internal → closed → open testing</strong> before production</li>\n<li>Use <strong>staged rollouts</strong>: 5% → 20% → 50% → 100% with 24-48h monitoring</li>\n<li>Monitor Crashlytics + ANR rate + rating before expanding rollout</li>\n<li><strong>Never skip staged rollout</strong> for significant changes</li>\n</ul>\n<h3>App Signing</h3>\n<ul>\n<li>Upload key (Play App Signing): stored in CI secrets, never committed</li>\n<li>Use Google Play App Signing for distribution key management</li>\n<li>Document key recovery procedure in team runbook</li>\n</ul>\n<hr>\n<h2>§8 Performance</h2>\n<h3>Startup Performance</h3>\n<ul>\n<li>App startup time target: <strong>cold start &lt; 1s</strong>, warm start &lt; 500ms</li>\n<li>Use <strong>App Startup library</strong> for initializing libraries lazily</li>\n<li>Baseline profiles generated + committed to repo</li>\n<li>Heavy initialization moved off main thread</li>\n</ul>\n<h3>UI Performance</h3>\n<ul>\n<li>Target: <strong>60fps</strong> (90/120fps on supported devices); <strong>zero jank</strong></li>\n<li>Measure with <strong>Android Studio Profiler</strong> + <code>FrameMetrics</code> API</li>\n<li>Avoid allocation in <code>draw()</code> / <code>onMeasure()</code> / composition</li>\n<li>Use <code>derivedStateOf</code> in Compose to avoid unnecessary recompositions</li>\n<li>Image loading: Coil (Compose) / Glide / Picasso — never load full-res in thumbnails</li>\n</ul>\n<h3>Memory</h3>\n<ul>\n<li>No <code>Activity</code> / <code>Context</code> references in ViewModels or singletons</li>\n<li>WeakReferences for listeners stored beyond their owner's lifecycle</li>\n<li>Bitmap recycling and memory cache sizing</li>\n<li>Heap dump + leak detection via <strong>LeakCanary</strong> in debug builds (always)</li>\n</ul>\n<h3>Network</h3>\n<ul>\n<li>HTTP caching headers respected</li>\n<li>Image CDN + WebP format</li>\n<li>Gzip/Brotli compression verified</li>\n<li>Request batching where applicable</li>\n<li>Connection pooling configured</li>\n</ul>\n<h3>Battery</h3>\n<ul>\n<li>Background work only via <strong>WorkManager</strong> with appropriate constraints</li>\n<li>Location updates: request only needed accuracy level; stop when backgrounded</li>\n<li>Wakelocks used sparingly with explicit release</li>\n</ul>\n<hr>\n<h2>§9 Debugging &amp; Bug Fixing</h2>\n<h3>Debugging Process</h3>\n<ol>\n<li><strong>Reproduce reliably</strong> — document exact steps, device, OS version, account state</li>\n<li><strong>Isolate</strong> — is it UI, business logic, network, or persistence?</li>\n<li><strong>Instrument</strong> — add targeted logs / breakpoints, NOT shotgun logging</li>\n<li><strong>Hypothesize</strong> — form 1-3 specific hypotheses before touching code</li>\n<li><strong>Fix the root cause</strong> — never patch symptoms; trace back to the source</li>\n<li><strong>Regression test</strong> — write a test that fails before fix, passes after</li>\n<li><strong>Document</strong> — comment explaining why the fix works, not just what it does</li>\n</ol>\n<h3>Common Android Bug Patterns</h3>\n<table>\n<thead>\n<tr>\n<th>Bug</th>\n<th>Likely Cause</th>\n<th>Fix</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ANR</td>\n<td>Main thread I/O / long computation</td>\n<td>Move to coroutine/Dispatcher.IO</td>\n</tr>\n<tr>\n<td>Memory leak</td>\n<td>Context stored in singleton</td>\n<td>Use <code>applicationContext</code>; WeakRef</td>\n</tr>\n<tr>\n<td>Crash on rotation</td>\n<td>ViewModel not used; state not saved</td>\n<td><code>rememberSaveable</code> / ViewModel</td>\n</tr>\n<tr>\n<td>UI lag</td>\n<td>Recomposition loops</td>\n<td><code>derivedStateOf</code>, stable params</td>\n</tr>\n<tr>\n<td>Blank screen after API call</td>\n<td>Error swallowed silently</td>\n<td>Check error state propagation</td>\n</tr>\n<tr>\n<td>Deep link not working</td>\n<td>Manifest intent-filter missing</td>\n<td>Verify <code>adb shell am start</code> test</td>\n</tr>\n<tr>\n<td>Push notification silent</td>\n<td>Background restrictions</td>\n<td>Test on real devices across OEMs</td>\n</tr>\n</tbody>\n</table>\n<h3>Logging Standards</h3>\n<ul>\n<li><strong>Production:</strong> Firebase Crashlytics only (no <code>Log.d</code> in release builds)</li>\n<li><strong>Debug/Staging:</strong> Timber with debug tree</li>\n<li>Log levels: ERROR (crashes), WARN (recoverable), INFO (key events), DEBUG (dev only)</li>\n<li>Never log PII — mask emails, phone numbers, tokens in logs</li>\n</ul>\n<h3>OEM-Specific Issues</h3>\n<ul>\n<li>Test on <strong>Samsung</strong>, <strong>Xiaomi/MIUI</strong>, <strong>OnePlus/OxygenOS</strong>, <strong>Huawei (no GMS)</strong> for critical flows</li>\n<li>Background restrictions vary widely by OEM — test push, alarms, background sync</li>\n<li>Maintain a physical or cloud device farm with top market-share devices</li>\n</ul>\n<hr>\n<h2>§10 Development Roadmap</h2>\n<p>Follow this phase structure for any new Android project:</p>\n<h3>Phase 0 — Foundation (Week 1-2)</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Stack decision documented with rationale</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Module structure defined</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Design system tokens defined (colors, type, spacing, shapes)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> CI pipeline running (lint + unit tests + build)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Crash reporting integrated (Crashlytics/Sentry)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Analytics baseline integrated (Firebase/Amplitude)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> API contract / mock server set up</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> DI framework configured</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Navigation skeleton implemented</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Flavor/build variant config complete</li>\n</ul>\n<h3>Phase 1 — Core Features (Weeks 3-8)</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Auth flow (login, register, token refresh, logout)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Core screen shells with real navigation</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Network layer (client, interceptors, error handling)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Local persistence layer (DB schema + DAOs)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Repository layer wiring remote + local</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> ViewModels + UI states for each feature</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Unit tests for all ViewModels + use cases</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Feature flags infrastructure</li>\n</ul>\n<h3>Phase 2 — Polish (Weeks 9-12)</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Design QA pass against Figma/spec</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Accessibility audit (TalkBack, contrast, touch targets)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Dark mode implementation + verification</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Localization (strings externalized, RTL support if needed)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Loading, empty, error states on every screen</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Deep link handling</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Widget / notification implementation</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Offline mode verification</li>\n</ul>\n<h3>Phase 3 — Hardening (Weeks 12-14)</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Performance profiling (startup, scroll, memory)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> E2E test suite on device farm (Firebase Test Lab)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Security review (certificate pinning, biometrics, secure storage)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Proguard / R8 rules verified</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Crash-free rate ≥ 99.5% on staging</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Play Store listing, screenshots, privacy policy</li>\n</ul>\n<h3>Phase 4 — Release</h3>\n<ul>\n<li><input disabled=\"disabled\" type=\"checkbox\"> AAB signed and uploaded to internal track</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Staged rollout plan defined</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Monitoring dashboard set up (Crashlytics, Play Console vitals)</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> Rollback plan documented</li>\n<li><input disabled=\"disabled\" type=\"checkbox\"> On-call rotation assigned</li>\n</ul>\n<h3>Phase 5 — Post-Launch (Ongoing)</h3>\n<ul>\n<li>Crash-free rate monitored daily</li>\n<li>ANR rate &lt; 0.47% (Play Store threshold)</li>\n<li>App rating monitored; negative reviews triaged weekly</li>\n<li>Dependency updates reviewed monthly</li>\n<li>OS beta testing with each new Android release</li>\n</ul>\n<hr>\n<h2>Limitations</h2>\n<ul>\n<li>This skill is scoped to Android and Android-adjacent delivery paths; it does not cover iOS-only architecture, App Store release operations, or Apple platform UI guidance.</li>\n<li>Version numbers, Play Console policy thresholds, and recommended libraries can change; verify release-critical details against current Android, Google Play, and library documentation before shipping.</li>\n<li>Code snippets are architecture patterns, not complete applications; adapt package names, dependency versions, permissions, privacy disclosures, and security controls to the actual project.</li>\n<li>The guidance does not replace device QA, accessibility review, security review, legal/privacy review, or store compliance checks for a production release.</li>\n</ul>\n<h2>Additional Resources</h2>\n<p>For stack-specific deep dives, read:</p>\n<ul>\n<li><code>references/native-android.md</code> — Kotlin, Compose, Room, Hilt, Coroutines</li>\n<li><code>references/java-android.md</code> — Java, XML Views, ViewBinding, LiveData, Retrofit, Room, Hilt, migration path</li>\n<li><code>references/flutter.md</code> — Dart, BLoC/Riverpod, Drift, go_router</li>\n<li><code>references/react-native.md</code> — TypeScript, RN architecture, Hermes, New Architecture</li>\n<li><code>references/kmm.md</code> — KMM shared modules, SQLDelight, Ktor, Compose Multiplatform</li>\n<li><code>references/hybrid.md</code> — Capacitor, Ionic, PWA considerations</li>\n</ul>\n","files":[{"path":"references/flutter.md","sizeBytes":7027,"isText":true},{"path":"references/hybrid.md","sizeBytes":4568,"isText":true},{"path":"references/java-android.md","sizeBytes":17243,"isText":true},{"path":"references/kmm.md","sizeBytes":5964,"isText":true},{"path":"references/native-android.md","sizeBytes":7804,"isText":true},{"path":"references/react-native.md","sizeBytes":7253,"isText":true},{"path":"SKILL.md","sizeBytes":21874,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"human-reviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"human-reviewed","screen":{"ran":true,"outcome":"flagged-cleared-by-moderator","suspicious":1,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-17T11:41:32.224274Z","sha256":"73664ADDA3F2BA2FC20327BD4CFE2A052FCAEAC73F5BAE5C4483B79A81644E3A","sizeBytes":27354},"review":null,"source":{"repositoryUrl":"https://github.com/sickn33/agentic-awesome-skills","path":"skills/android-dev","license":"MIT","commit":"f2bba339de74414b0771234cbe4f6a15258e32a3","subtreeSha":"F8E0835A03D43B4FD95AD196F4141D27C8094D8A740C0542D35FBB5E3AF006CE","lastSyncedAt":"2026-09-25T06:48:39.853703Z"},"reviewedAt":"2026-08-17T11:42:11.013982Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/android-dev"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sickn33-agentic-awesome-skills@llmmart"},{"target":"git","command":"git clone https://github.com/sickn33/agentic-awesome-skills.git"}]}