Android
Module 1
For Notes download BCA Resources App
What’s Android?
• Android is an open-source, Linux-based operating system primarily
designed for touchscreen mobile devices such as smartphones, tablets,
smartwatches, TVs, and even automobiles.
• It is the world’s most popular mobile OS, powering billions of devices
globally.
• Android provides a user-friendly interface, multi-tasking capabilities, and
extensive customization options, making it the preferred choice for both
users and developers.
• Developed by Android Inc. and later acquired by Google in 2005.
For Notes download BCA Resources App
Open Handset Alliance (OHA)
• The Open Handset Alliance (OHA) is a consortium of technology
companies formed by Google in 2007 to develop open standards for
mobile devices.
• The primary goal of the OHA is to create a unified, open-source mobile
platform that allows manufacturers and developers to build high-quality
mobile experiences.
For Notes download BCA Resources App
Why is Android?
1. Open Source
• Android is an open-source OS, developed under the Android Open Source Project
(AOSP).
• Manufacturers and developers can modify the OS to create custom versions (e.g.,
Samsung’s One UI, Xiaomi’s MIUI).
• Open-source nature encourages innovation and allows for custom software
development.
• No expensive licensing fees like proprietary OS (e.g., iOS).
For Notes download BCA Resources App
Why is Android?
2. Multi-Carrier Support
• Android supports multiple carriers globally, allowing users to switch networks
easily.
• Compatible with 2G, 3G, 4G, and 5G networks across different regions.
• Supports dual SIM functionality, enabling users to use multiple carriers on a
single device.
• Works with major mobile operators worldwide, ensuring seamless connectivity.
For Notes download BCA Resources App
Why is Android?
3. Zero/Negligible Development Cost
• Android provides free development tools like Android Studio, SDK, and Emulator.
• No expensive licenses needed to develop Android apps.
• Developers can use Java, Kotlin, or C++, which are widely used programming
languages.
• The Google Play Store charges a one-time fee ($25), which is cheaper than
Apple's $99 yearly fee.
For Notes download BCA Resources App
Why is Android?
4. Custom ROM
• Users can install Custom ROMs to personalize their Android experience.
• Custom ROMs extend device lifespan by providing updates for older phones.
• Offers more control over UI, battery life, and performance tweaks.
For Notes download BCA Resources App
Why is Android?
5. Google Integration
• Deep integration with Google services such as Gmail, Google Maps, Google Drive,
and Google Assistant.
• Supports Google Cloud Sync, enabling users to back up data and restore it easily.
For Notes download BCA Resources App
Android Activity
• In Android development, an Activity represents a single screen with a
user interface. The app starts by main activity which serves as an entry
point for user interaction within an application.
• Each Android application consists of one or more activities, and these
activities work together to create a seamless user experience.
• For example, in a messaging app, one activity may handle the login
screen, another may display the list of conversations, and yet another
may show an individual chat.
For Notes download BCA Resources App
Android Lifecycle
• The Android Activity Lifecycle defines how an activity transitions through
different states from its creation to its destruction.
• The lifecycle of an activity consists of several stages, each corresponding to a
specific method in the activity class. These methods allow developers to
perform actions when the activity enters or leaves a particular state.
1. onCreate(Bundle savedInstanceState)
2. onStart()
3. onResume()
4. onPause()
5. onStop()
6. onRestart()
7. onDestroy()
For Notes download BCA Resources App
Android Architecture
1. Application Layer
• The Application Layer is the topmost layer of the Android architecture, where users interact with installed apps.
This layer includes both system applications (such as Contacts, Messages, Camera, and Phone) and third-party
applications installed from the Play Store.
• Applications are developed using Java, Kotlin, or other supported languages, and their user interfaces are defined
using XML layouts. The Android system ensures that applications interact with lower layers only through
predefined APIs, preventing direct access to hardware or system resources.
Key components in this layer include:
• Activities allow users to interact with the app.
• Services for handling background processes related to the app
• Content Providers for managing shared data across apps.
• Broadcast Receivers for listening to system-wide or app-specific events.
For Notes download BCA Resources App
Android Architecture
2. Application Framework Layer
• The Application Framework Layer is the layer that provides high-level services to the applications. It offers an
extensive set of APIs and services for managing app resources, user interface, and communication with the
underlying layers. This layer is designed to simplify the app development process by offering pre-built services
like window management, user input, and content management.
Some of the important components in this layer include:
• Activity Manager: Manages the lifecycle of activities, including handling user navigation between screens.
• Content Providers: Manage access to shared data in different apps, allowing data to be queried, inserted, or
modified.
• Resource Manager: Provides access to app resources, such as images, strings, and layouts.
• Notification Manager: Allows apps to create and manage notifications for the user.
• View System: Manages the UI elements, layouts, and their interactions with the user.
For Notes download BCA Resources App
Android Architecture
3. Libraries
• The Libraries Layer consists of core libraries that provide fundamental functionalities to Android applications.
These libraries are built in C++, and Java and offer various utilities that developers use while building apps.
Some important Android core libraries include:
• [Link] – Provides classes for managing the lifecycle and interactions of Android applications.
• [Link] – Facilitates communication between different components of an application and enables data
sharing.
• [Link] – Supports database operations and allows interaction with SQLite databases.
• [Link] – Contains system-level utilities for handling processes, messages, and services.
• [Link] – Provides text-handling capabilities, including formatting and styling text.
• [Link] – Defines the fundamental building blocks for user interface elements.
For Notes download BCA Resources App
Android Architecture
4. Android Runtime
• The Android Runtime Layer is responsible for executing applications on an Android device. In earlier versions of
Android, this layer used the Dalvik Virtual Machine (DVM) to run applications.
• DVM was designed specifically for Android to optimize performance and memory usage on mobile devices with
limited resources.
• Unlike traditional Java Virtual Machines (JVMs), which execute Java bytecode, Dalvik runs files in a format called
Dalvik Executable (.dex), which is optimized for low memory and efficient execution on mobile hardware.
For Notes download BCA Resources App
Android Architecture
5. Linux Kernel
• Linux Kernel serves as the backbone of the entire system. It is the foundational layer of the Android architecture,
responsible for managing hardware resources, such as the CPU, memory, storage, and network interfaces. It also
provides the fundamental security features and process management for the operating system.
For Notes download BCA Resources App