Subject : Mobile Application Development
Subject Code : 3170726
Semester : 7TH BE
Topic : Android OS
Prepared By:
Prof. Richa Bhadauria
What is Android?
• Android is an open source, Linux-based operating system for mobile devices such
as smartphones, tablets, etc.
• Open source means that the source code (the human-readable code written by
developers) of the software is publicly available. Anyone can:
• View the code
• Modify it
• Share it
• Distribute their own versions
• Android is an open source operating system, so it allows developer to create their
application at free of cost.
• When we say Android is "Linux-based", it means:
• Android’s core operating system is built on top of the Linux kernel, which is
the fundamental part of the Linux operating system.
• The Linux kernel provides essential low-level services like:
Managing hardware (CPU, memory, drivers)
Security and permissions
Process and task management
Networking
• Android was originally developed by a company called Android Inc., which was
founded in October 2003 in Palo Alto, California, by Andy Rubin, Rich Miner,
Nick Sears, and Chris White.
• However, the company was later faced with the insufficiency of funds which
brought Google into the picture.
• In August 2005, Google acquired Android Inc. for an estimated $50 million.
• On November 5, 2007, Google officially unveiled Android and the Open
Handset Alliance (OHA).
• The first public Android Beta Version 1.0 was finally published on 5th November
2007.
• The first Android device released on 23 September 2008.
• Android is an open-source software stack that includes the operating system,
middleware, and essential applications.
Operating System (OS)
• Manages hardware resources, security, memory, and core system services.
Middleware
• Acts as a bridge between the OS and applications.
• Handles app lifecycle, data management, graphics, and media.
Key Applications
• Built-in apps like Phone, Contacts, Browser, Messaging, etc
Android Devices
Why Android?
Features of Android
Android Versions
Name Version Name
Android 1.0 1.0
Android 1.1 1.1
Android Cupcake 1.5
Android Donut 1.6
Android Éclair 2.0 / 2.1
Android Froyo 2.2
Android Gingerbread 2.3
Android HoneyComb 3.0
Android Icecream Sandwich 4.0
Android JellyBean 4.1
Android KitKat 4.4
Android Lollipop 5.0
Name Version Name
Android Marshmallow 6.0
Android Nougat 7.0
Android Oreo 8.0
Android Pie 9
Android 10 (Quince Tart) 10
Android 11 (Red Velvet Cake) 11
Android 12 (Snow Cone) 12
Android 13 (Tiramisu) 13
Android 14 (Upside Down Cake) 14
Android 15 (Vanilla Ice Cream) 15
Android 16 (Baklava) 16
Android Architecture
Android Architecture
Android provides a set of core applications:
• Email Client
• SMS Program
• Calendar
• Maps
• Browser
• Contacts, etc.
• Enabling and simplifying the reuse of components
Developers have full access to the same framework APIs used by the core
applications.
Users are allowed to replace components.
• Including a set of C/C++ libraries used by components of the Android system
• Exposed to developers through the Android application framework
Core Libraries
Providing most of the functionality available in the core libraries of the Java language
APIs
Data Structures
Utilities
File Access
Network Access
Graphics
• Relying on Linux Kernel for core system services
Memory and Process Management
Network Stack
Driver Model
Security
Providing an abstraction layer between the H/W and the rest of
the S/W stack
Building Blocks of Android Applications
• Activities
• Services
• Broadcast Receiver
• Content Provider
Activity
• An activity represents a single screen.
• An activity is an application component that provides a screen with which user can
interact in order to do something, such as dial the phone, take a photo, send an
email, or view a map.
• An application usually consists of multiple activities that are connected with each
other.
• Typically one activity in an application is specified as “main” activity, which is
presented to the user when launching the application for the first time.
• Each activity can then start another activity in order to perform different actions.
• Each time a new activity starts, the previous activity is stopped, but the system
preserves the activity in a stack. When a new activity starts, it is pushed onto the
back stack and takes user focus.
The Activity Lifecycle
• Activities have a lifecycle, controlled by the Android system
• Things that cause lifecycle/activity state changes:
• Creation of a new activity
• Activation (manually or programmatically) of an activity that wasn’t active
before
• Rotation of the device
• Interruptions from other apps (i.e. phone calls)
• Low memory
• Other
Four States of an Activity
• Does not exists
• Foreground
• Background
• Pause
Activity Methods
• onCreate()
• onStart()
• onResume()
• onPause()
• onStop()
• onRestart()
• onDestroy()
• protected void onCreate(Bundle savedInstanceState)
• When the system first creates the activity (set the UI/content view here)
• protected void onStart()
• Makes the activity visible to the user (usually no need to implement)
• protected void onResume()
• Activity is in the foreground and ready for the user to interact with it
• protected void onPause()
• First indication that the user is leaving the activity. It is no longer in the
foreground.
• protected void onStop()
• Activity is no longer visible to the user
• protected void onDestroy()
• Activity is about to be destroyed (either because it is finished or there was a
configuration change—most commonly a rotation of the device)
• protected void onRestart()
• Called if the activity was stopped but not destroyed, and is now being restarted
• The activity was not active but is about to become active
• onStart() will be called next
• protected void onSaveInstanceState(Bundle savedInstanceState)
• Called between onPause() and onStop()
• Provides an opportunity to save state so it can be restored after a configuration
change (i.e. rotation)
THANK YOU