Android platform overview.

We shift from pure Kotlin to Android development. Android is a mobile operating system with its own architecture, components, and development model. Today we understand what Android is and how applications fit into the platform.

Android is a Linux-based operating system.

It runs on phones, tablets, watches, TVs, and cars. Billions of devices worldwide use Android.

Android is open source. The core platform is maintained by Google. Device manufacturers customize it.

As a developer, you write applications that run on Android. The platform provides services your app uses. UI, storage, networking, sensors.

Android handles security, resource management, and lifecycle. Your app operates within the platform's rules.

Android is built in layers.

The Linux kernel sits at the bottom. It manages hardware, memory, processes, and security.

Above that, the Hardware Abstraction Layer lets the platform talk to specific devices. Camera, GPS, sensors.

Native libraries and the Android Runtime provide system services. Graphics, database, media codecs.

The Application Framework gives you APIs. Activity management, content providers, notification services.

Your application sits at the top. It uses the framework to interact with the system.

Android apps are built from four types of components.

Activities are screens. They provide user interface. Users interact with activities.

Services run in the background. They do work without UI. Music playback, syncing data.

Broadcast Receivers respond to system-wide events. Battery low, incoming call, airplane mode.

Content Providers manage shared data. Contacts, media files, app databases accessible to others.

Most apps primarily use Activities. Services and Receivers handle background work. Content Providers are less common.

Your Kotlin code compiles to bytecode that runs on the Android Runtime.

ART, Android Runtime, executes applications. Each app runs in its own process with its own instance of ART.

ART uses ahead-of-time compilation. When you install an app, it compiles to native code. Faster execution at runtime.

Garbage collection handles memory. Like JVM, but optimized for mobile. Smaller devices, limited resources.

Your code feels like regular Kotlin or Java. The runtime handles the translation to run on the device.

Each Android app runs in its own process.

The process is isolated. Your app cannot directly access another app's memory. Security by isolation.

When you start an app, Android creates a process. The app's components run in that process.

Android can kill processes when resources are low. Background apps get killed first. Your app must handle this.

The main thread handles UI. Never block the main thread. Use background threads or coroutines for long operations.

Every Android app has a manifest file.

AndroidManifest dot xml declares your app to the system. What components it has. What permissions it needs.

Activities must be declared in the manifest. Services, receivers, and providers too.

The manifest declares the app's package name. This uniquely identifies your app on the device and Play Store.

Minimum SDK version, target SDK version, required features. The manifest tells the system what your app needs.

The system reads the manifest to know how to launch and manage your app.

Apps need permission to access sensitive resources.

Camera, location, contacts, microphone. Users must grant permission.

Declare permissions in the manifest. uses-permission android dot permission dot CAMERA.

Some permissions are granted at install. Others require runtime approval. The user sees a dialog and chooses.

From Android 6 onwards, dangerous permissions require runtime requests. You ask, the user decides.

Respect user privacy. Only request permissions you need. Explain why you need them.

Android development uses Android Studio.

You write Kotlin code. Define UI in XML or Compose. Configure the build with Gradle.

Build produces an APK or App Bundle. This contains your code, resources, and manifest.

Install on a device or emulator for testing. The emulator simulates various devices.

Debug with Android Studio. Inspect logs, set breakpoints, profile performance.

Release through Google Play Store. Sign your app. Upload. Users download.

Let us summarize.

Android is a Linux-based mobile OS with layered architecture.

Apps have four component types: Activities, Services, Broadcast Receivers, Content Providers.

Each app runs in its own isolated process on the Android Runtime.

The manifest declares components and permissions.

Permissions protect sensitive resources. Request only what you need.

Android Studio provides the development environment.