android-architecture

Guide Android app implementation with Clean Architecture, Hilt, and Jetpack Compose.

9|3|Updated Sep 16, 2024
One-click install
npx skills add https://github.com/huyhunhngc/battery_meter --skill android-architecture-huyhunhngc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-architecture
Source: https://github.com/huyhunhngc/battery_meter/tree/main/.agent/skills/android-architecture
Command: npx skills add https://github.com/huyhunhngc/battery_meter --skill android-architecture-huyhunhngc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive blueprint for structuring Android applications using Clean Architecture principles, ensuring maintainability, scalability, and testability.

Core Features & Use Cases

  • Architectural Guidance: Detailed project structure, DI with Hilt, and navigation patterns.
  • State Management: Effective UI state handling using StateFlow and ViewModel.
  • Use Case: A new Android project needs to be set up following best practices for dependency injection, navigation, and data handling. This Skill offers the exact patterns to implement.

Quick Start

Follow the project structure and DI conventions outlined in this skill to set up a new Android application.

Frequently Asked Questions about android-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Android app with Clean Architecture and Jetpack Compose?

To structure an Android app with Clean Architecture, separate your project into distinct layers for presentation, domain, and data. This Skill guides you in implementing the presentation layer using Jetpack Compose, ensuring maintainability and testability across your application.

What is the best way to manage UI state in an Android MVVM app?

The best way to manage UI state in an Android MVVM app is using StateFlow within your ViewModels. This approach provides efficient, type-safe state handling that integrates seamlessly with Jetpack Compose to observe and react to state changes.

How do I set up dependency injection with Hilt for a new Android project?

To set up dependency injection with Hilt for a new Android project, follow the specific project structure and DI conventions provided by this Skill. It offers exact patterns to configure your application, ensuring robust and scalable dependency management across architectural layers.

Can I use Jetpack Compose with type-safe navigation in Clean Architecture?

Yes, you can use Jetpack Compose with type-safe navigation in Clean Architecture. This Skill covers specific navigation patterns that ensure type safety when routing between different composables in your Android application.

How do I handle background processing in an Android application following Clean Architecture?

To handle background processing in an Android application following Clean Architecture, use WorkManager. This Skill covers integrating WorkManager to manage deferrable, guaranteed background tasks without disruptating your MVVM structure or dependency injection setup.

Does Clean Architecture for Android require separating ViewModels from Use Cases?

Yes, Clean Architecture for Android requires separating ViewModels from Use Cases to maintain strict boundaries. ViewModels handle UI state via StateFlow, while Use Cases encapsulate single business logic operations, keeping your codebase scalable and testable.