CH-1 Android OS Design and Features-1
CH-1 Android OS Design and Features-1
What is Android?
Android is a mobile operating system that is based on a modified version of Linux. It
was originally developed by a startup of the same name, Android Inc.
An operating system is a software program that acts as intermediary between the user and
the computer hardware.
Operating system enables the hardware to communicate and operate with software.
Operating system also provides a software platform on top of which other programs called
Application program can run.
User
Applications
Operating system
Hardware
What is Linux?
Linux is a family of free and open-source software operating system built around Linux
kernel.
Linux kernel is a core of Linux operating system, acts as a bridge between computers
hardware and its software application.
Open-source means license free and freely available to the public. User can view and make
any kind of changes to it.
Android history
➢ Initially, Andy Rubin founded Android incorporation with Rich Miner, Nick Sears, Chris
white in Palo Alto, California, United States in October 2003.
➢ Andy Rubin is a father of android platform his company Android Inc, was acquired by
Google on 17th August 2005 for $50M.
In terms of how applications work on a smartphone, mobile apps may be divided into three
categories.
1) Native Apps
Native Apps are designed for specific operating systems such as Android, iOS,
and Windows. Apps make use of device features such as RAM, camera, GPS, and so on.
2) Web Apps
Web apps, or web applications, are software programs that run directly in a web browser.
They do not require any downloads or installations on your device. Instead, you can access
3) Hybrid Apps
Hybrid Apps that combine features from native apps and with components from
web apps. These apps are designed to work on multiple platforms, such as Android
for use in a single system family, platform, or device, like Android, iOS, or Windows.
A native app is specially made and coded for a specific mobile platform in its native
programming language.
apps for one or more other platforms or mobile operating systems simultaneously. This can
also enable developers to essentially use the same code base for different platforms.
Features of Android
➢ Multiple Language Support- Android supports multiple languages in its operating system
and one can change the language very easily based on one’s requirement.
➢ Web browser: Based on the open-source Web Kit, together with Chrome’s V8 JavaScript
engine.
➢ Media support: Includes support for the following media: H.263, H.264 (in 3GP or MP4
container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (in MP4 or 3GP
container), MP3, MIDI, Ogg, WAV, JPEG, PNG, GIF, and BMP
and GPS
➢ Multi-tasking: Android provides support to run apps and services in the background with ease
which allows the users to use multiple apps at the same time.
➢ Automation-Some apps allow you to automate your tasks by granting them controls of those
apps.
➢ Widgets-Android widgets let you display just about any feature you choose on the home screen,
➢ Custom ROMs-Because the Android operating system is open-source, developers can twist the
current OS and build their versions, which users can download and install in place of the stock
OS.
This is the kernel on which Android is based. This layer contains all the low level
device drivers needed during the runtime of an Android device, such as camera drivers, display
drivers, audio drivers, Bluetooth drivers, and memory drivers, among others.
• Security: The Linux kernel maintains the security between an application and the
host system.
• Multitasking: One of the main features of Linux is its support for pre-emptive
it enables multiple processes to share the same processors (CPUs) and other
2. Libraries:
• The library provides the device with a set of instructions that allow it to handle different
• Some key Android libraries that are available for Android development,
▪ App: Provides access to the application model and is the foundation of all Android
applications.
format.
3. Android runtime:
• At the same layer as the libraries, the Android runtime provides a set of core
libraries that enable developers to write Android apps using the Java
programming language.
• The Android runtime also includes the Dalvik virtual machine (DVM), which
enables every Android application to run in its own process, with its own instance
of the Dalvik virtual machine (Android applications are compiled into the Dalvik
executables).
optimized for battery-powered mobile devices with limited memory and CPU.
4. Application Framework:
• Activity Manager: Plays a crucial role in bringing all aspects of the applications lifecycle
• Content Providers: These providers enable applications to publish data online and share
• View System: It serves as a base class for widgets and handles events.
5. Applications:
• At this top layer, you will find applications that ship with the Android device
Android SDK
The Android SDK (software development kit) provides a selection of tools that are required to
build Android applications and ensures the process goes as smoothly as possible. Whether
you create an application using Java, Kotlin or C#, you need the SDK to get it to run on any
Android device. You can also use an emulator to test the applications that you have built.
• Required libraries.
• Debugger.
• An emulator.
• Relevant documentation for the Android application program interfaces (APIs).
• Sample source code.
• Tutorials for the Android OS
1. Insightful APK Analyzer- Helps to optimize your Android app size by inspecting the
contents of your app APK file or Android App Bundle. Inspect the manifest file,
resources, and DEX files. Compare two APKs or Android App Bundles to see how your
app size changed between app versions.
2. Fast Emulator- Install and run your apps faster than with a physical device and simulate
different configurations and device types, including Tablets, Wear OS, Android
Automotive, and Android TV.
3. Intelligent Code Editor- Helps write a better code, work faster, and be more productive
with an intelligent code editor that provides code completion for Kotlin, Java, and
C/C++ programming languages.
4. Flexible build system- Android Studio's build system lets you customize your build to
generate multiple build variants for different Android devices from a single project.
Then analyze the performance of your builds and understand where potential build
issues exist in your project with the Build Analyzer.
5. Real-time Profilers- The built-in profiling tools provide real-time statistics for your
app's CPU, memory, and energy usage activity.
6. Offline maps- SDK helps in dynamically downloading the maps for more than 190
countries in over 60 languages. You can view these offline. Also dealing with the map
styles and the touch gesture.
1. Open any web browser and navigate to the Android Studio download page.
2. This is the Android Developers website, where you can download Android Studio. This
page automatically detects your operating system.
3. Click Download Android Studio. The Terms and Conditions page with the Android
Studio License Agreement opens.
4. Read the License Agreement.
5. At the bottom of the page, if you agree with the terms and conditions, select the I have
read and agree with the above terms and conditions checkbox.
6. Click Download Android Studio to start the download.
7. When prompted, save the file to a location where you can easily locate it, such as the
Downloads folder.
8. Wait for the download to complete. This may take a while and may be a good moment
to enjoy some tea!
1. Open the folder where you downloaded and saved the Android Studio installation file.
2. Double-click the downloaded file.
3. If you see a User Account Control dialog about allowing the installation to make
changes to your computer, click Yes to confirm the installation.
8. Choose your preference of light or dark theme when Android Studio first launches.
Screenshots in this course use the light theme but choose whichever one you prefer.
9. During the installation, the setup wizard downloads and installs additional components
and tools needed for Android app development. This may take some time depending
on your internet speed. During this time, you may see a User Account Control Dialog
for Windows Command Processor. Click Yes to accept the dialog.
10. You may also receive a Windows Security Alert about adb.exe. Click Allow Access,
if needed, to continue the installation.
AVDs are used to simulate the software builds and hardware configurations available on
different physical devices. This lets you test your application on a variety of hardware platforms
without needing to buy a variety of phones.
Creating an Android Virtual Device (AVD) in Android Studio is a straightforward process. Here
is how you can do it:
11. You can now configure the properties of your AVD, such as the orientation, scale,
and RAM allocation.
12. Once you have configured the settings, click “Finish.”
1) Choose the Right Development Method: Decide whether your app will be native, hybrid,
or web-based, as each has its own set of advantages and disadvantages.
2) Maintain High Code Quality: Write clean, readable, and maintainable code. Use tools
like Proguard to minimize APK size by removing unused code.
3) Consistent Coding Style: Use descriptive names and keep your code simple.
Consistency in coding style makes it easier for others to understand and maintain your
code.
4) Understand Android Documentation: Familiarize yourself with Android’s official
documentation to stay updated on the latest features and best practices.
5) User Input Handling: Design your app to handle user input intelligently, such as opening
the number pad for numeric inputs.
6) Architecture Recommendations: Follow a layered architecture that separates concerns,
complies with the single source of truth principle, and adheres to unidirectional data
flow principles.
7) Use Android Jetpack: Utilize the suite of libraries and tools provided by Android Jetpack
to follow best practices and reduce boilerplate code.
8) Testing: Implement thorough testing practices to ensure your app works well across
different devices and Android versions.
9) Security and Privacy: -Always prioritize user security and privacy. Store sensitive data
securely and request permissions responsibly.
10) Performance Optimization: Monitor your app’s performance and optimize it to
run smoothly, reducing battery consumption and memory usage3.
11) Responsive Design: Ensure your app provides a good user experience on different
screen sizes and resolutions.
12) Continuous Learning: The Android platform is constantly evolving, so it is
important to keep learning and adapting to new technologies and methodologies4.
Android tools
1. Android Studio: The official Integrated Development Environment (IDE) for Android app
development, providing code editing, debugging, performance tooling, a flexible build
system, and an instant build/deploy system1.
2. SDK Platform Tools: These include essential tools such as ADB (Android Debug Bridge)
and fast boot, which are used for debugging and interacting with Android devices2.
3. Gradle: The build automation system that Android Studio uses to manage dependencies
and build processes.
4. Jetpack Compose: A modern toolkit for building native UIs in Android Studio, allowing
developers to create dynamic layouts with less code.
5. Android Virtual Device (AVD) Manager: Part of Android Studio, it allows developers to
emulate Android devices for testing purposes.
6. ProGuard: A tool that helps to minimize and obfuscate the code in an Android
application to make it harder to reverse engineer.
7. Android SDK Manager: Allows developers to download tools, platforms, and other
components needed for Android development.
8. Android Device Monitor: Provides a graphical interface for monitoring and managing
Android devices during debugging.
9. Firebase: A suite of cloud services that provides functionalities like analytics, databases,
messaging, and crash reporting.
10. Android Jetpack: A collection of libraries, tools, and architectural guides to help
make it quick and easy to build great Android apps.
3. The New Project window opens with a list of templates provided by Android Studio.
4. In Android Studio, a project template is an Android project that provides the blueprint
for a certain type of app. Templates create the structure of the project and the files
needed for Android Studio to build your project. The template that you choose provides
starter code to get you going faster.
5. Make sure the Phone and Tablet tab is selected.
6. Click the Empty Activity template to select it as the template for your project. The Empty
Activity template is the template to create a simple project that you can use to build a
Compose app. It has a single screen and displays the text "Hello Android!".
7. Click Next. The New Project dialog opens. This has some fields to configure your
project.
8. Configure your project as follows:
9. The Name field is used to enter the name of your project, for this codelab type "Greeting
Card".
10. Leave the Package name field as is. This is how your files will be organized in the
file structure. In this case, the package name will be com.example.greetingcard.
11. Leave the Save location field as is. It contains the location where all the files
related to your project are saved. Take a note of where that is on your computer so that
you can find your files.
12. Select API 24: Android 7.0 (Nougat) from the menu in the Minimum SDK field.
Minimum SDK indicates the minimum version of Android that your app can run on.
13. Click Finish. This may take a while - this is a great time to get a cup of tea! While
Android Studio is setting up, a progress bar and message indicates whether Android
Studio is still setting up your project. It may look like this:
14. A message that looks like this informs you when the project set up is created.
15. You may see a What's New pane which contains updates on new features in
Android Studio. Close it for now.
16. Click Split on the top right of Android Studio, this allows you to view both code
and design. You can also click Code to view code only or click Design to view design
only.
17. After pressing Split you should see three areas:
18. The Project view (1) shows the files and folders of your project.
19. The Code view (2) is where you edit code.
20. The Design view (3) is where you preview what your app looks like
21. In the Design view, you will see a blank pane with this text:
22. Click Build & Refresh. It may take a while to build but when it is done the preview
shows a text box that says, "Hello Android!". Empty Compose activity contains all the
code necessary to create this app.
Android Activity Lifecycle
Activity is a screen that user interact with, every activity in Android has lifecycle like
Create, Start, Resume, Pause, Stop, Destroy and Restart.