# Android Components, Lifecycle & Gradle

> Activities, the lifecycle, configuration changes, intents, the manifest, resources and the Gradle build system. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/android-fundamentals
Last updated: 2026-11-28

Activities, the lifecycle, configuration changes, intents, the manifest, resources and the Gradle build system.

Intermediate · about 8 hours · difficulty 3/5

Learn first: [Native Android (Kotlin + Jetpack Compose)](https://www.internhack.in/roadmaps/tracks/mobile/native-android), [Kotlin Essentials](https://www.internhack.in/roadmaps/tracks/mobile/kotlin)

Even in a Compose-only app, the Android system talks to you through components and lifecycle callbacks. Misunderstanding them causes the most classic Android bugs.

### Components

- **Activity**: an entry point with a window; modern apps often use a single activity hosting Compose.
- **Service**, **BroadcastReceiver** and **ContentProvider**: background work, system events and shared data (you will use these less directly now, through Jetpack libraries).
- **Intents** start components and talk to other apps (share sheets, opening a URL).

### Lifecycle

Activities move through `onCreate`, `onStart`, `onResume`, `onPause`, `onStop`, `onDestroy`. **Configuration changes** such as rotation or dark mode toggling recreate the activity by default, so state must live in a `ViewModel` or be saved with `rememberSaveable`. The system may also kill your process in the background (process death); test it with "Don't keep activities" in developer options.

### Build system

Gradle with Kotlin DSL (`build.gradle.kts`), version catalogs (`libs.versions.toml`), build types (debug/release) and product flavors (free/paid, staging/prod). `minSdk`, `targetSdk` and `compileSdk` control compatibility.

**Good enough to move on:** your app keeps its state across rotation and process death, and has debug and release build types configured.

## Key concepts

- **Activities and single-activity apps**
- **Activity lifecycle**
- **Configuration changes and process death**
- **Intents**
- **Manifest and resources**
- **Gradle Kotlin DSL and version catalogs**
- **Build types and product flavors**
- **Services and broadcast receivers**

## Mini project

Build a counter app that survives rotation, dark mode toggling and process death, with a share button that uses an intent.

## Check yourself

What is process death, and how do you test that your app recovers from it?

## Free resources

- [The activity lifecycle](https://developer.android.com/guide/components/activities/activity-lifecycle) (Android Developers)
- [Configure your build](https://developer.android.com/build) (Android Developers)
- [Android courses](https://developer.android.com/courses) (Android Developers)

Previous: [Platform Channels & Native Integration in Flutter](https://www.internhack.in/roadmaps/tracks/mobile/flutter-platform-channels) · Next: [Jetpack Compose in Depth](https://www.internhack.in/roadmaps/tracks/mobile/compose-in-depth)

## More in Android with Kotlin in Depth

- [Android Components, Lifecycle & Gradle](https://www.internhack.in/roadmaps/tracks/mobile/android-fundamentals)
- [Jetpack Compose in Depth](https://www.internhack.in/roadmaps/tracks/mobile/compose-in-depth)
- [Modern Android Architecture: ViewModel, Flow, Hilt & Room](https://www.internhack.in/roadmaps/tracks/mobile/android-architecture)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
