Shri Alpesh N. Patel Postgraduate Institute of Science & Research
Shri Alpesh N. Patel Postgraduate Institute of Science & Research
• Introduction to Android
• Standard development environment for Android applications
• Installing Android
• Introduction to Android Studio
• Creating Hello World and running application on Emulator
• Android Architectural Overview and Android Development
Framework
• Structure of Android application
• Components of Android
Introduction to Android:
• The world is contracting with the growth of mobile phone technology.
• As the number of users is increasing day by day, facilities are also
increasing.
• Starting with simple regular handsets which were used just for making
phone calls, mobiles have changed our lives and have become part of
it.
• Now they are not used just for making calls but they have innumerable
uses and can be used as a Camera, Music player, Tablet PC, T.V., Web
browser, etc. And with the new technologies, new software and
operating systems are required.
What is Android?
• Android is the world's most popular operating system for mobile devices
and tablets. It is an open-source operating system, created by Google,
and available to all kinds of developers with various expertise levels,
ranging from rookie to professional.
• One of the most widely used mobile OS these days is ANDROID.
Android Inc was founded in Palo Alto of California, the U.S. by Andy
Rubin, Rich miner, Nick Sears, and Chris White in 2003. Later Android
Inc. was acquired by Google in 2005. After the original release, there
have been several updates in the original version of Android.
• From a developer's perspective, Android is a Linux-based operating
system for smartphones and tablets. It includes a touch screen user
interface, widgets, camera, network data monitoring, and all the other
features that enable a cell phone to be called a smartphone.
• Android is a platform that supports various applications, available
through the Android Play Store.
• The Android platform also allows end-users to develop, install and use
their applications on top of the Android framework. The Android
framework is licensed under the Apache License, with Android
Contact photo and select to call, SMS, ability to search all saved
SMS, MMS messages, delete the oldest message automatically when
the defined limit is reached, Minor API, bug fixes.
circular app icons support, send GIFs directly from the default
keyboard, battery
Android 11
• Android 11 operating system is the eleventh big release of Android. It is
the 18th version of Android mobile OS, which was released on 8
September 2020. The alphabetic naming system of Android, based on
deserts, was stopped since Android 10. So therefore, this operating
system has branded with "Android 11".
History of Android:
• The Motorola DynaTAC800X was the first commercially available
portable cell phone.
• First Marketed in 1983, it was 13 * 1.75 * 3.5 inches in dimension.
• Weighted about 2.5 pounds (1.134 kg)
• It allowed you to talk for a little more than half an hour.
• The price for it is $3,995/- + Monthly service fees + per-minute
charge.
• The first clamshell phone, the Motorola StarTAC was released in
1996.
• It merely had an LCD ten-digit segmented display.
Android SDK:
Installing Android:
To begin with android apps development, we need to install the SDK and some
other required components. Following are the steps one may follow to have
the Android SDK.
Note: Creating AVDs is a great way to see how our application might work
across different operating systems and handset types, as AVDs can mimic not
only different Android Operating Systems but also different hardware; we can
change such settings as heap size, display type, and maximum memory,
making it useful to try and figure out where bugs are happening when we
don’t own a multitude of different handsets to test on!
Android Studio
• Android Studio is the official Integrated Development Environment
(IDE) for android application development.
• Android Studio provides more features that enhance our productivity
while building Android apps.
• Android Studio was announced on 16th May 2013 at the Google I/O
conference as an official IDE for Android app development.
• It started its early access preview from version 0.1 in May 2013. The
first stable built version was released in December 2014, starts from
version 1.0.
• Since 7th May 2019, Kotlin is Google's preferred language for Android
application development. Besides this, other programming languages
are supported by Android Studio.
Features of Android Studio:
• It has a flexible Gradle-based build system.
• It has a fast and feature-rich emulator for app testing.
• Android Studio has a consolidated environment where we can develop
for all Android devices.
• Apply changes to the resource code of our running app without
restarting the app.
• It provides build-in supports for the Google Cloud Platform. It makes it
easy to integrate Google Cloud Messaging and App Engine.
Linux kernel:
At the bottom of the layers is Linux - Linux 2.6 with approximately 115
patches. This provides basic system functionality like process management,
memory management, device management like camera, keypad, display, etc.
Also, the kernel handles all the things that Linux is really good at such as
networking and a vast array of device drivers, which take the pain out of
interfacing to peripheral hardware.
Libraries:
On top of the Linux kernel, there is a set of libraries including open-source
Web browser engine WebKit, well known library libc, SQLite database which
is a useful repository for storage and sharing of application data, libraries to
play and record audio and video, SSL libraries responsible for Internet
security, etc.
Android Runtime:
This is the third section of the architecture and available on the second layer
from the bottom. This section provides a key component called Dalvik Virtual
Machine (DVM) which is a kind of Java Virtual Machine (JVM) specially
designed and optimized for Android. The Dalvik VM enables every Android
application to run in its process, with its instance of the Dalvik virtual
machine.
The Android runtime also provides a set of core libraries that enable Android
application developers to write Android applications using standard Java
programming language.
Application Framework:
The Application Framework layer provides many higher-level services to
applications in the form of Java classes. Application developers are allowed to
make use of these services in their applications.
Applications:
We will find all the Android applications at the top layer. We will write our
application to be installed on this layer only. Examples of such applications
are Contacts Books, Browser, Games, etc.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello Android!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
File: MainActivity.java
package first.javatpoint.com.welcome;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
After booting the emulator, the android studio installs the application and
launches the activity.
Components of Android:
Views and View Groups: “Views” are user interface widgets. The base class
for all the views is android. A “View Group” is for arranging other views. They
are also called layout managers the base class for “view Groups”