Introduction to Android Development
Android operating system is the largest installed base among various mobile platforms across the globe. Hundreds
of millions of mobile devices are powered by Android in more than 190 countries of the world. It conquered
around 71% of the global market share by the end of 2021, and this trend is growing bigger every other day. The
company named Open Handset Alliance developed Android for the first time that is based on the modified version
of the Linux kernel and other open-source software. Google sponsored the project at initial stages and in the year
2005, it acquired the whole company. In September 2008, the first Android-powered device was launched in the
market. Android dominates the mobile OS industry because of the long list of features it provides. It's user-friendly,
has huge community support, provides a greater extent of customization, and a large number of companies build
Android-compatible smartphones.
Features of Android
• Android is an Open Source Project so we can customize the OS based on our requirements.
• Android supports different types of connectivity for GSM, CDMA, Wi-Fi, Bluetooth, etc. for telephonic
conversation or data transfer.
• Using wifi technology we can pair with other devices while playing games or using other applications.
• It contains multiple APIs to support location-tracking services such as GPS.
• We can manage all data storage-related activities by using the file manager.
• It contains a wide range of media supports like AVI, MKV, FLV, MPEG4, etc. to play or record a variety of
audio/video.
• It also supports different image formats like JPEG, PNG, GIF, BMP, MP3, etc.
• It supports multimedia hardware control to perform playback or recording using a camera and microphone.
• Android has an integrated open-source WebKit layout-based web browser to support User Interfaces like
HTML5, and CSS3.
• Android supports multi-tasking means we can run multiple applications at a time and can switch between
them.
• It provides support for virtual reality or 2D/3D Graphics.
Android Versions
API
Code Name Version level Release date
September 23,
- Android 1.0 1
2008
API
Code Name Version level Release date
February 9,
- Android 1.1 2
2009
Cupcake Android 1.5 3 April 30, 2009
September 15,
Donut Android 1.6 4
2009
Android 2.0 - October 26,
Eclair 5-7
2.1 2009
Android 2.2 -
Froyo 8 May 20, 2010
2.2.3
Android 2.3 - December 6,
Gingerbread 9-10
2.3.4 2010
Android 3.0.x - 11 - February 22,
Honeycomb
3.2.x 13 2011
API
Code Name Version level Release date
Ice Cream Android 4.0 - 14 - October 18,
Sandwich 4.0.4 15 2011
Android 4.1 - 16 -
Jelly Bean July 9, 2012
4.1.2 18
Android 4.4 -
Kitkat 19 July 9, 2012
4.4.4
Android 5.0 - 21 - October 17,
Lollipop
5.1 22 2014
Android 6.0 -
Marshmallow 23 October 5, 2015
6.0.1
Android 7.0 - 24 - August 22,
Nougat
7.1 25 2016
API
Code Name Version level Release date
August 21,
Oreo Android 8.0 26
2017
Pie Android 9.0 27 August 6, 2018
September 3,
Android Q Android 10.0 29
2019
September 8,
Android 11 Android 11.0 30
2020
Android 12.0 -
Snow Cone 31-32 October 4, 2021
12.1
August 15,
Tiramisu Android 13 33
2022
Upside Down
Android 14 34 October 4, 2023
Cake
API
Code Name Version level Release date
Vanilla Ice
Android 15 35 May 15, 2024
Cream
Programming Languages used in Developing Android Applications
1. Java
2. Kotlin
Developing the Android Application using Kotlin is preferred by Google,
as Kotlin is made an official language for Android Development, which
is developed and maintained by JetBrains. Previously before Java is
considered the official language for Android Development. Kotlin is
made official for Android Development in Google I/O 2017.
Advantages of Android Development
• The Android is an open-source Operating system and hence
possesses a vast community for support.
• The design of the Android Application has guidelines from Google,
which becomes easier for developers to produce more intuitive user
applications.
• Fragmentation gives more power to Android Applications. This
means the application can run two activities on a single screen.
• Releasing the Android application in the Google play store is easier
when it is compared to other platforms.
Disadvantages of Android Development
• Fragmentation provides a very intuitive approach to user experience
but it has some drawbacks, where the development team needs time
to adjust to the various screen sizes of mobile smartphones that are
now available in the market and invoke the particular features in the
application.
• The Android devices might vary broadly. So the testing of the
application becomes more difficult.
• As the development and testing consume more time, the cost of the
application may increase, depending on the application's complexity
and features.
OPEN HANDSET ALLIANCE (OHA)
The Open Handset Alliance (OHA) is a consortium of 84 technology and
mobile companies, led by Google, that developed the Android operating
system. For mobile developers, OHA's creation of Android provides a
free, open-source, and standardized framework that removes barriers to
entry and allows for deep device integration. [1, 2, 3, 4, 5]
The OHA’s foundational role in the mobile industry shapes app
development in several key ways:
• Open-Source Freedom: Android is built on an open Linux kernel. This
allows developers to freely modify the platform, access
comprehensive APIs, and distribute applications without being
restricted by proprietary, closed-system gatekeepers. [1, 2, 3, 4]
• Hardware Standardization: By uniting handset manufacturers (e.g.,
Samsung, Motorola, Sony), chipmakers (e.g., Qualcomm), and carriers
under one umbrella, OHA ensures a consistent development
environment across thousands of distinct devices. This makes it easier
to write code that works across multiple manufacturers. [1, 2, 3, 4]
• Core Functionality Access: The OHA's framework was designed from
the ground up to let developers seamlessly call upon phone
hardware and core functions. Applications can natively access
cameras, GPS, Wi-Fi, and SMS/calling, enabling richer user
experiences. [1]
• Standardized Tools: The OHA’s initiative paved the way for unified
development environments. Developers can build and test
applications using the official Android SDK (Software Development
Kit) within the Android Studio IDE, streamlining the entire
development lifecycle from coding to publishing. [1, 2, 3, 4, 5]
Difference between iOS and Android:
[Link]. IOS ANDROID
It was developed by
It was developed and is owned Google and Open Handset
by Apple Incorporation. Alliance and is owned
1. by Google LLC.
Google was initially
IOS was initially released on
released on 23 September
July 29, 2007
2. 2008.
[Link]. IOS ANDROID
when IOS was released its first When Google released its
version is iPhone OS 1 before first version of Android 1.0,
3. named IOS. Alpha.
4. It was launched in 2007. It was launched in 2008.
Latest stable release version: Latest stable release
5. iOS 15.3.1 and iPadOS 15.3.1 version: Android 14
Its target system types are
Its target system types are
smartphones, music players,
smartphones and tablets.
6. and tablet computers.
It is designed for
It is specially designed for
smartphones of all
Apple iphones and ipads.
7. companies.
Its kernel type is Linux-
Its kernel type is Hybrid.
8. based.
[Link]. IOS ANDROID
It has preferred license is It has the preferred license
Proprietary, APSL, and GNU of Apache 2.0 and GNU
9. GPL. GPLv2.
It is mainly written in C, C++,
It is written using C, C++,
Objective-C, assembly
Java, and other languages.
10. language, and Swift.
Its update management is Its update management is
11. Software Update. Systems Software Update.
Java and Kotlin are majorly
Swift is majorly used for iOS
used for Android
application development.
12. application development.
IOS has a Commercial Based
Android is an Open Source
Source model with open
based Source model.
13. source components.
[Link]. IOS ANDROID
Android devices have
IOS-based Devices have Safari
google chrome but one can
as the default Internet
install any Internet
Browser.
14. Browser.
Google has Google
IOS has Siri as Voice Assistant.
15. Assistance.
IOS-based devices have the
But Google doesn't block
feature of blocking 3rd party
3rd party app stores.
16. app stores.
Android Devices are
IOS devices are available in 40
available in 100+
languages.
17. languages.
In IOS customizability is limited In Android, we can change
18. unless jailbroken. almost anything.
File transfer in android is easier File transfer in IOS is more
19. than in IOS. difficult than in android.
[Link]. IOS ANDROID
None on the iPhone 7 and have a headphone jack, but
later; lighting 3.5mm no longer some current Android
comes with the phone after the smartphones lack a
20. iPhone XS. headphone jack.
Android Architecture
Android architecture contains a different number of components to support any Android device's needs. Android
software contains an open-source Linux Kernel having a collection of a number of C/C++ libraries which are exposed
through application framework services. Among all the components Linux Kernel provides the main functionality of
operating system functions to smartphones and Dalvik Virtual Machine (DVM) provide a platform for running an
Android application.
Components of Android Architecture
The main components of Android architecture are the following:-
• Applications
• Application Framework
• Android Runtime
• Platform Libraries
• Linux Kernel
Pictorial representation of Android architecture with several main components and their sub-components
1. Applications
Applications is the top layer of android architecture. The pre-installed applications like home, contacts, camera,
gallery etc and third party applications downloaded from the play store like chat applications, games etc. will be
installed on this layer only. It runs within the Android run time with the help of the classes and services provided by
the application framework.
2. Application framework
The Application Framework is a core part of Android that gives developers the tools and services they need to build
apps. It provides access to device features like hardware, screen display, and system resources. It includes several
important services that make it easier to build powerful and consistent Android apps without having to create
everything from scratch. The services are as follows:
1. Activity Manager - Manages the app’s activities and their life cycle (like opening, pausing, or closing screens).
2. Notification Manager - Allows apps to show alerts or updates to the user.
3. Package Manager - Keeps track of all the apps installed on the device.
4. Window Manager - Handles the placement and appearance of windows on the screen.
5. Content Providers - Help apps share data with other apps (like contacts or photos).
6. View System - Controls how things (like buttons or text) appear on the screen.
3. Application runtime
Android Runtime environment is one of the most important part of Android. It contains components like
core libraries and the Dalvik virtual machine(DVM). Mainly, it provides the base for the application framework and
powers our application with the help of the core libraries. Like Java Virtual Machine (JVM), Dalvik Virtual Machine
(DVM) is a register-based virtual machine and specially designed and optimized for android to ensure that a device
can run multiple instances efficiently. It depends on the layer Linux kernel for threading and low-level memory
management. The core libraries enable us to implement android applications using the standard JAVA or Kotlin
programming languages.
4. Platform libraries
The Platform Libraries includes various C/C++ core libraries and Java based libraries such as Media, Graphics, Surface
Manager, OpenGL etc. to provide a support for android development.
• Media library provides support to play and record an audio and video formats.
• Surface manager responsible for managing access to the display subsystem.
• SGL and OpenGL both cross-language, cross-platform application program interface (API) are used for 2D
and 3D computer graphics.
• SQLite provides database support and FreeType provides font support.
• Web-Kit This open source web browser engine provides all the functionality to display web content and to
simplify page loading.
• SSL (Secure Sockets Layer) is security technology to establish an encrypted link between a web server and a
web browser.
5. Linux Kernel
Linux Kernel is heart of the android architecture. It manages all the available drivers such as display drivers, camera
drivers, Bluetooth drivers, audio drivers, memory drivers, etc. which are required during the runtime. The Linux
Kernel will provide an abstraction layer between the device hardware and the other components of android
architecture. It is responsible for management of memory, power, devices etc. The features of Linux kernel are:
• Security: The Linux kernel handles the security between the application and the system.
• Memory Management: It efficiently handles the memory management thereby providing the freedom to
develop our apps.
• Process Management: It manages the process well, allocates resources to processes whenever they need
them.
• Network Stack: It effectively handles the network communication.
• Driver Model: It ensures that the application works properly on the device and hardware manufacturers
responsible for building their drivers into the Linux build.
Android Project folder Structure
Android Studio is the official IDE (Integrated Development Environment) developed by the JetBrains community
which is freely provided by Google for android app development. After completing the setup of Android Architecture
we can create an android application in the studio. We need to create a new project for each sample application and
we should understand the folder structure.
The android project contains different types of app modules, source code files, and resource files. We will explore all
the folders and files in the android app.
1. Manifests Folder
2. Java Folder
3. res (Resources) Folder
• Drawable Folder
• Layout Folder
• Mipmap Folder
• Values Folder
4. Gradle Scripts
Manifests Folder
Manifests folder contains [Link] for
creating our android application. This file contains
information about our application such as the Android
version, metadata, states package for Kotlin file, and
other application components. It acts as an intermediator
between android OS and our application.
Java folder
The Java folder contains all the java and Kotlin source code (.java) files that we create during
the app development, including other Test files. If we create any new project using Kotlin, by
default the class file [Link] file will create automatically under the package name
“[Link]” as shown below.
Resource (res) folder
The resource folder is the most important folder because it contains all the non-code sources like images, XML
layouts, and UI strings for our android application.
res/drawable folder
It contains the different types of images used for the development of the application. We need to add all the images
in a drawable folder for the application development.
Gradle Scripts folder
Gradle means automated build system and it contains a number of files that are used to define a build configuration
that can be applied to all modules in our application. In [Link] (Project) there are buildscripts and in
[Link] (Module) plugins and implementations are used to build configurations that can be applied to all our
application modules.
Android Development Tools (with Proper Definitions)
1. Android Studio
Definition:
Android Studio is the official Integrated Development Environment (IDE) for Android application development,
developed by Google. It provides all the tools needed to design, code, test, debug, and publish Android applications.
Features:
• Smart code editor
• Visual Layout Editor
• Android Emulator
• Debugging tools
• APK Analyzer
• Git integration
• Gradle build support
2. Android SDK (Software Development Kit)
Definition:
The Android SDK is a collection of software tools, libraries, APIs, and documentation that developers use to build
Android applications.
Components:
• SDK Manager
• Build Tools
• Platform Tools
• Emulator
• Libraries
• Documentation
Purpose:
Provides everything required to compile and run Android applications.
3. Android Emulator
Definition:
The Android Emulator is a virtual Android device that runs on a computer. It allows developers to test applications
without needing a physical Android device.
Features:
• Simulates different Android devices
• Supports GPS, camera, and sensors
• Tests multiple Android versions
• Fast debugging
4. Android Debug Bridge (ADB)
Definition:
ADB is a command-line tool that enables communication between a computer and an Android device or emulator.
Functions:
• Install and uninstall apps
• Copy files
• Access device shell
• Capture logs
• Debug applications
5. Gradle
Definition:
Gradle is an automated build system used in Android Studio to compile source code, manage dependencies, package
applications, and generate APK or AAB files.
Advantages:
• Faster builds
• Dependency management
• Multiple build variants
• Automation support
6. Kotlin
Definition:
Kotlin is Google's preferred programming language for Android development. It is modern, concise, and fully
interoperable with Java.
Features:
• Less code
• Null safety
• Coroutines for asynchronous programming
• High performance
• Easy to learn
7. Java
Definition:
Java is an object-oriented programming language that has traditionally been used for Android app development. It is
still widely supported by Android Studio.
Features:
• Platform independent
• Secure
• Robust
• Object-oriented
• Rich libraries
8. XML (Extensible Markup Language)
Definition:
XML is used to design the user interface (UI) of Android applications. It defines layouts, buttons, text fields, images,
and other visual components.
Purpose:
• UI design
• Layout management
• Resource organization
9. Jetpack Compose
Definition:
Jetpack Compose is Google's modern toolkit for building Android user interfaces using Kotlin code instead of XML.
Advantages:
• Less code
• Faster UI development
• Better performance
• Easier maintenance
• Reactive programming model
10. Room Database
Definition:
Room is a persistence library that provides an abstraction layer over SQLite, making database operations easier and
safer.
Features:
• Simplifies SQLite
• Compile-time verification
• Easy CRUD operations
• Supports LiveData and Flow
11. SQLite
Definition:
SQLite is a lightweight, embedded relational database used to store application data locally on Android devices.
Uses:
• Store user information
• Offline data storage
• Cache application data
12. Firebase
Definition:
Firebase is Google's Backend-as-a-Service (BaaS) platform that provides backend services for Android applications.
Services:
• Authentication
• Cloud Firestore
• Realtime Database
• Cloud Messaging (FCM)
• Analytics
• Crashlytics
13. Retrofit
Definition:
Retrofit is a type-safe HTTP client library used for making REST API calls from Android applications.
Features:
• Easy API integration
• JSON conversion
• Supports GET, POST, PUT, DELETE requests
• Error handling
14. Git
Definition:
Git is a distributed version control system used to track changes in source code and enable collaboration among
developers.
Advantages:
• Version tracking
• Team collaboration
• Branch management
• Backup of source code
15. GitHub
Definition:
GitHub is a cloud-based platform that hosts Git repositories, allowing developers to store, share, and collaborate on
Android projects.
Features:
• Code hosting
• Pull requests
• Issue tracking
• CI/CD integration
16. JUnit
Definition:
JUnit is a unit testing framework used to test individual components of Android applications and ensure they work
correctly.
Benefits:
• Detects bugs early
• Improves code quality
• Supports automated testing
17. Espresso
Definition:
Espresso is Google's UI testing framework used to automate testing of Android application's user interface.
Features:
• Fast UI testing
• Reliable automation
• Easy integration with Android Studio
18. Logcat
Definition:
Logcat is a logging tool in Android Studio that displays system messages, application logs, errors, and debugging
information.
Uses:
• Error detection
• Performance monitoring
• Debugging application crashes
19. APK Analyzer
Definition:
APK Analyzer is a tool in Android Studio used to inspect the contents, size, and structure of APK files.
Benefits:
• Analyze APK size
• Optimize application
• Find unnecessary resources
20. Android Profiler
Definition:
Android Profiler is a performance analysis tool that monitors CPU usage, memory consumption, network activity,
and battery usage of Android applications.
Advantages:
• Detect memory leaks
• Improve performance
• Monitor CPU usage
• Analyze network requests
• Structure of Android Manifest File
([Link])
• Definition
• The Android Manifest file ([Link]) is one of the most important files in an
Android application. It provides essential information about the app to the Android operating system,
such as the application's package name, components (activities, services, receivers, and providers),
permissions, hardware/software requirements, and other configuration details.