Android
Introduction
What is Android?
• Android is a software package and Linux-based operating system for mobile
devices such as tablet computers, smartphones, smart watches, and smart TVs.
• It was developed by Google and later the OHA (Open Handset Alliance). Java and
Kotlin are the languages mainly used to write Android code, although other
languages can also be used.
• Open Handset Alliance (OHA) Is a consortium of 84 companies, including Google,
Samsung, AKM, Synaptics, KDDI, Garmin, Teleca, eBay, Intel, etc. It was
established on 5th November 2007, led by Google. It is committed to advancing
open standards, providing services, and deploying handsets using the Android
Platform.
Features of Android
• It 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.
• 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 multitasking, which means we can run multiple applications at a time and
switch between them.
• It provides support for virtual reality or 2D/3D Graphics
Android Versions
Code Name Version API level Release date
– Android 1.0 1 September 23, 2008
– Android 1.1 2 February 9, 2009
Cupcake Android 1.5 3 April 30, 2009
Donut Android 1.6 4 September 15, 2009
Eclair Android 2.0 – 2.1 5-7 October 26, 2009
Froyo Android 2.2 – 2.2.3 8 May 20, 2010
Gingerbread Android 2.3 – 2.3.4 9-10 December 6, 2010
Honeycomb Android 3.0.x – 3.2.x 11 – 13 February 22, 2011
Ice Cream Sandwich Android 4.0 – 4.0.4 14 – 15 October 18, 2011
Jelly Bean Android 4.1 – 4.1.2 16 – 18 July 9, 2012
Kitkat Android 4.4 – 4.4.4 19 July 9, 2012
Lollipop Android 5.0 – 5.1 21 – 22 October 17, 2014
Marshmallow Android 6.0 – 6.0.1 23 October 5, 2015
Nougat Android 7.0 – 7.1 24 – 25 August 22, 2016
Oreo Android 8.0 26 August 21, 2017
Pie Android 9.0 27 August 6, 2018
Android Q Android 10.0 29 September 3, 2019
Android 11 Android 11.0 30 September 8, 2020
Snow Cone Android 12.0 – 12.1 31-32 October 4, 2021
Tiramisu Android 13 33 Aug 15, 2022
Upside Down Cake Android 14 34 Oct 4, 2023
Vanilla Ice Cream (Beta v) Android 15 35 Preview
Programming Languages used in Developing Android
Applications
1. Java
2. Kotlin
• Google prefers developing the Android application using Kotlin,
as Kotlin is made an official language for Android development
and is developed and maintained by JetBrains. Previously Java
was considered the official language for Android Development.
Kotlin is made official for Android Development in Google I/O
2017.
Advantages of Android development
Android is largely supported by Google, allowing you to use Google's various services.
Android is an open source and runs on mobile devices, tablets, etc.
It is multitasking, which means you can run many applications at the same time. For example, you can browse Facebook while
listening to songs.
The Android operating system is available on mobile phones from various manufacturers, such as Samsung, Motorola, HTC, Sony
Ericsson, etc.
Users can easily access a variety of settings.
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 makes it easier for developers to produce more
intuitive user applications.
Fragmentation gives Android applications more power. This means the application can run two activities on a single screen.
Releasing the Android application in the Google Play Store is easier than other platforms.
Disadvantages of Android Development
Android requires a continuous Internet connection if you are using Google services.
Android shows error & forces to close the large apps/games, which is very annoying.
It takes a large amount of mobile data if many background processes are running.
It increases the usage of RAM and decreases battery performance when many processes are running in the
background.
Fragmentation provides a very intuitive approach to user experience. Still, it has some drawbacks, such as
the development team needing time to adjust to the various screen sizes of mobile smartphones now
available in the market and invoke the particular features in the application.
Android Application Components
• The following are the Android Application Components:
1. Activity
2. Services
3. Content Providers
4. Broadcast Receivers
1. Activity
Activity represents a single screen with a user interface.
It is an individual user interface screen in an Android Application where visual elements are called Views.
It interacts with the user to do only one thing: unlock the screen, dial a phone, etc.
If a new activity starts, the previous activity stops, but the data is preserved.
An application consists of multiple activities.
For example, an email application has one activity: displaying a list of new emails, another to compose emails,
read emails, and so on.
2. Services
Services perform the action without user interaction in the background but do not get initiated without
user invocation.
It does not require a user interface.
It is an Android application component that runs in the background and has no visual UI.
It is used to perform the processing part of your application in the background.
For example, music player application. When the music station plays the song, the user can open another
application, and the song will play in the background.
3. Content Providers
Manage and share app data with other apps using a standard interface.
Content providers are the android application component that provides a flexible way to
make data available across applications.
It manages common data based on permissions.
It manages the data which is being shared by more than one application.
For example – you can consider looking for contact details in the contact list. Or You might
want photos from the gallery which are also provided by Content Provider.
4. Broadcast Receivers
• Broadcast Receiver is a component that responds to broadcast
messages from another application or the same system. It can
also deliver broadcasts to applications that are not running.
• For example – notify the user that the battery is low. Android
developers can use broadcast messages in the application or
outside the normal flow.
Assignment
1. Describe Android architecture in detail.
2. Differentiate between JVM and DVM. Explain how each one
works.
3. Explain the activity life cycle.