Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 104 ยท Getting Started

What Is Android Development?

Learn what Android development is: the OS layers, how apps differ from APIs, why Kotlin and Jetpack Compose are the modern default, and how this track teaches it.

Android is an operating system for phones, tablets, watches, TVs, cars and foldables. As an Android developer you write apps: programs that the operating system installs, starts, pauses and stops on a device you do not control. That last part is what makes Android development different from writing a command-line program. You rarely start at main() and run to the end. You describe components, and the system decides when to create them.

This lesson is a map. You will see the layers of the platform, the difference between your app and the APIs it calls, which languages and UI toolkits matter today, and how this track works when no emulator can run inside your browser. If you have not learned Kotlin yet, start with the Kotlin tutorial, which gives a shorter tour of the same ground.

The layers of the platform

Android is built in layers. You normally touch only the top two, but knowing the rest explains many surprises, such as why your app can be killed in the background or why it cannot read another app's files.

flowchart TD
    A["Your app<br/>(Kotlin, Compose, resources)"] --> B["Android framework APIs<br/>(Activity, Intent, Context, Views)"]
    B --> C["Android Runtime (ART)<br/>and native libraries"]
    C --> D["Hardware abstraction layer (HAL)"]
    D --> E["Linux kernel<br/>(processes, memory, drivers)"]

Each layer only talks to the one directly below it; your code sits on top.

  • Linux kernel. Handles processes, memory, drivers and security. Every app runs as its own Linux user in its own process, which is the base of Android's sandbox.
  • Hardware abstraction layer (HAL). A stable interface to cameras, sensors, radios and so on, so the same framework works on thousands of different devices.
  • Android Runtime (ART) and native libraries. ART runs your compiled code. Kotlin is compiled to JVM bytecode, then converted into Android's own format (DEX) and optimized on the device. Native libraries provide graphics, media and databases.
  • Framework APIs. The Java and Kotlin classes you import: Activity, Intent, Context, Bundle, notifications, permissions and more. This is "the Android SDK".
  • Your app. Your code, your resources (strings, images, colors) and a manifest file that tells the system what is inside.

Your app versus the APIs it calls

Newcomers often blur two things that are really separate.

The framework is code Google ships with each Android version. It is on the device. When you call a framework API, you are calling the version of Android the user has installed. That is why a feature may exist on Android 14 but not on Android 9, and why you must check the version before using it.

Libraries are code that you bundle inside your app. Jetpack libraries (Compose, Room, Navigation, WorkManager and many others) belong here. They ship with your app, so you control their version and they behave the same on every supported device. Google moved many features out of the framework and into Jetpack libraries for exactly this reason: you get fixes and new features without waiting for users to update their phone.

You tell the build which Android versions your app supports with three numbers, which you will meet properly in Gradle for Android: minSdk (the oldest version you run on), targetSdk (the version you have tested against) and compileSdk (the version of the framework APIs you compile against).

An app is a set of components

You do not write one big program. You declare components and the system creates instances of them when something happens: the user taps the icon, a notification arrives, or another app asks yours to do something.

Component What it is Example
Activity One entry point with a window The main screen of a notes app
Service Work without a screen of its own Playing music in the background
Broadcast receiver Reacts to system or app events The device finished booting
Content provider Shares structured data between apps The contacts database

Most apps today are built from a single Activity that hosts every screen as composable functions. You will study Activities and their lifecycle in Activities and setContent and The Activity Lifecycle. The important mindset change is this: the system owns your objects' lifetime. Your job is to react correctly when it says "you are being created" or "you are going to the background".

Kotlin first, Compose first

Android supports Java, Kotlin and C++, but Google's own guidance has been Kotlin-first since 2019. New Jetpack libraries are designed for Kotlin, many are usable only from Kotlin, and almost every official sample is Kotlin. Coroutines and Flow, which you will use for background work, are Kotlin features.

For user interfaces, there are two toolkits:

  • Views and XML layouts. The original system. You describe a screen in an XML file and then change its widgets from code. It is mature and found in countless existing apps.
  • Jetpack Compose. A newer, declarative toolkit in which the UI is a Kotlin function of the current state. New apps and new Google samples use Compose.

This track teaches Compose from the start and covers Views only as interoperability in Views Interop and Legacy XML, because you will meet XML in real jobs. The Compose mindset is the subject of Thinking in Compose.

Here is the smallest real Android app you will see in this track. It is read-only: it needs the Android SDK and Gradle, which cannot run on this page.

Kotlin
// read-only example: needs the Android SDK and the Compose plugin
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            Greeting(name = "Android")
        }
    }
}

@Composable
fun Greeting(name: String) {
    Text(text = "Hello, $name!")
}

onCreate is a callback: the system calls it when it creates the Activity. setContent hands Compose a lambda that describes the screen. Greeting is a plain function marked @Composable, and it describes what to show for its input. Nothing here ever tells the screen how to update itself.

How this track works

The real technology cannot run on this site. There is no emulator and no Android SDK in your browser. We handle that in two honest ways.

  1. Real code is read-only. Manifest files, Gradle scripts, Compose functions and Room entities appear in plain code blocks labelled as read-only. They are accurate, but you cannot press Run on them.
  2. Runnable stand-ins show how it works inside. Each lesson includes small Kotlin programs, run on the same Kotlin runner as the Kotlin tutorial, that model the idea: a lifecycle state machine, a tiny UI tree, a ViewModel that survives a simulated rotation, a navigation back stack. They are not Android. They use only the standard library and coroutines, and each lesson says plainly what is real and what is the stand-in.

This split matches how professionals work. The less of your logic depends on Android classes, the easier it is to test on a plain JVM, so the stand-ins are also a preview of how to structure real code.

Here is the first stand-in. It models the idea that an app is a set of components that the system starts: you register what exists, and the "system" decides when to call you.

Kotlin The system starts your components, not you

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with readln()), it gets the next line from this box.

Notice that main never writes HomeActivity(). It only registers factories, and the system decides when each one runs. On a real device the factories are described in the manifest and instantiated by Android through reflection, but the shape of the control flow is the same: inversion of control.

The sandbox in one example

Because each app runs as its own Linux user, one app cannot read another app's private files. The kernel enforces this, not your code. This second stand-in models the check: every file has an owner, and a read succeeds only for the owner, unless the owner shares the file through an explicit, controlled path. On a real device the shared path is a content provider or the system file picker, and the check happens in the kernel and framework.

Kotlin Each app is its own user

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with readln()), it gets the next line from this box.

The notes app cannot open the bank's database, and the mail app can read only the one file the notes app shared. Later lessons, such as Files, Scoped Storage and Media, show the real sharing mechanisms.

What you will build

By the end of this track you will be able to:

  • set up Android Studio, run an app on an emulator and read Logcat;
  • build screens with Jetpack Compose, manage state and navigate between screens;
  • structure an app with ViewModel, repositories and a clear data flow;
  • store data with Room and DataStore and fetch it over the network;
  • run background work, write tests, shrink and sign a release and publish it;
  • put it all together in complete projects such as a notes app and a weather app.

The next two lessons prepare your machine and your mental model of a project. After that you start writing screens.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Who decides when an Activity of your app is created and destroyed?

    An app is a set of components. The system creates and destroys them and calls lifecycle callbacks on them; your code reacts.
  2. 2. Which statement about libraries such as Jetpack Compose and Room is correct?

    Jetpack libraries ship with your app. That is why new features arrive without waiting for users to upgrade Android itself.
  3. 3. What does it mean that Android is Kotlin-first?

    Java still works, but Google designs new libraries and samples for Kotlin first. Coroutines, Flow and Compose all rely on Kotlin features.
  4. 4. How does this track show code that needs the Android SDK?

    Real Android code is shown read-only and accurately. Runnable Kotlin stand-ins demonstrate the underlying ideas and say what is simulated.

Summary

  • Android is a layered system: Linux kernel, hardware abstraction, ART and native libraries, framework APIs, then your app.
  • The framework lives on the device; Jetpack libraries live inside your app.
  • An app is a set of components (Activity, Service, receiver, provider) that the system creates and destroys.
  • Kotlin and Jetpack Compose are the modern defaults; Views and XML remain important in existing code.
  • In this track, real Android code is read-only and runnable stand-ins explain how the ideas work.

Next, install the tools in Setting Up Android Studio.