0% found this document useful (0 votes)
134 views51 pages

Chapter-2 MAD (Android Development)

The document discusses Android operating system, its components like Java Development Kit, Java Runtime Environment, Java Virtual Machine and Android SDK. It also talks about Android development tools like Android Studio, Eclipse, Visual Studio - Xamarin and ADB. The document further explains Android Virtual Device and emulators.

Uploaded by

darshanawale02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views51 pages

Chapter-2 MAD (Android Development)

The document discusses Android operating system, its components like Java Development Kit, Java Runtime Environment, Java Virtual Machine and Android SDK. It also talks about Android development tools like Android Studio, Eclipse, Visual Studio - Xamarin and ADB. The document further explains Android Virtual Device and emulators.

Uploaded by

darshanawale02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Chapter 2

Installation & Configuration of


Android
Marks=06
Prof. Biradar R.Y.
What is an Operating System?
• An Operating system (OS) is a software which acts as an
interface between the end user and computer hardware.
• Every computer must have at least one OS to run other
programs.
• It is not possible for the user to use any computer or mobile
device without having an operating system.
• OS provides an environment in which a user can execute
programs in a convenient and efficient manner.
• An operating system is concerned with the allocation of
resources and services, such as memory, processors, devices,
and information.
• Thus operating system acts as manager of all the resources,
i.e. resource manager.
Functions of an Operating System
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
Types of an Operating System
• Batch Operating System
• Time-Sharing Operating Systems
• Distributed Operating System
• Network Operating System
• Real-Time Operating System
• Mobile Operating System
Mobile Operating System
• A mobile operating system, also called a mobile OS,
is an operating system that is specifically designed to
run on mobile devices such as mobile phones, smart
phones, PDAs, tablet computers and other handheld
devices.
• Mobile OS are Symbian OS, iPhone OS, RIM's
BlackBerry, Windows Mobile, Palm WebOS, Android.
• Android, WebOS are all derived from Linux. The
iPhone OS originated from BSD and NeXTSTEP, which
are related to Unix.
Java JDK (Java Development Kit)
• The JDK is a development environment for building
applications, applets, and components using the Java
programming language.
• It includes the Java Runtime Environment (JRE), an
interpreter/loader (Java), a compiler (javac), an archiver
(jar), a documentation generator (Javadoc) and other tools
needed in Java development.
• The JDK allows developers to create Java programs that can
be executed and run by the JVM and JRE.
• JDK is a package of tools for developing Java-based software
• JDK=JRE +Development Tool
JRE(Java Runtime Environment)
• The Java Runtime Environment provides the minimum
requirements for executing a Java application.
• It consists of the Java Virtual Machine (JVM), core
classes, and supporting files.
• JRE is a package of tools for running Java code.
• The JRE creates the JVM.
• The JRE can be used as a standalone component to
simply run Java programs.
• It's also part of the JDK.
• JRE=JVM +Library classes
JVM(Java Virtual Machine)
• JVM(Java Virtual Machine) acts as a run-time engine to run
Java applications.
• JVM is responsible for executing the java program line by
line hence it is also known as interpreter.
• JVM is the one that actually calls the main method present
in a java code. JVM is a part of JRE(Java Runtime
Environment).
• Java applications are called WORA (Write Once Run
Anywhere). This means a programmer can develop Java
code on one system and can expect it to run on any other
Java enabled system without any adjustment. This is all
possible because of JVM.
• JDK=JRE +Development Tool
• JRE=JVM +Library classes
Android SDK
• The Android SDK (software development kit) is a set of
development tools used to develop applications for Android
platform.
• The Android SDK tools compile your code along with any data and
resource files into an APK.
• APK is an Android package, which is an archive file with an .apk
extension.
• Android development starts with the Android SDK
• The Android SDK includes the following:
– Required libraries
– Debugger
– An emulator
– Relevant documentation for the Android application program interfaces
(APIs)
– Sample source code
– Tutorials for the Android OS
Android SDK
• The Android SDK can be broken down into
several components. These include:
– Platform-tools
– Build-tools
– SDK-tools
– The Android Debug Bridge (ADB)
– Android Emulator
2.2 Android Development Tools(ADT)
• ADT is a plugin for the Eclipse IDE which provides a suitable
environment to develop an Android application where
creation, compilation and debugging are possible .
• ADT can set up new Android projects, create an application
UI, insert packages based on the Android Framework API,
debug your application using the Android SDK tools and
export .apk files in order to distribute the application
• Also ADT provides custom XML editors and debug output
pane
• Role of ADT
Android Development Tools(ADT)
1) Android Studio
– official integrated development environment for all
Android applications
– Google created Android Studio in 2013
– Android Studio provides code editing, debugging, and
testing tools all within an easy-to-use drag-and-drop
interface.
– Android has Gradle-base support that has features like
visual layout editor, intelligent code editor, real-time
profilers and APK analyzer
– It is free to download and is supported not only by
Google, but also by a large and actively engaged
community of Android developers.
2) Eclipse
– Android Development Tools (ADT) is a plugin for the
Eclipse IDE that is designed to give you a powerful,
integrated environment in which to build Android
applications.
– It works very well with many different programming
languages.
– Google no longer offers support for Eclipse
– Eclipse quickly set up new Android projects, create an
application UI, add components based on the Android
Framework API, debug applications using the Android
SDK tools, and even export signed (or unsigned) APKs in
order to distribute application.
– Developing in Eclipse with ADT is the fastest way to get
3) Visual Studio – Xamarin
– Xamarin was launched in 2011 which is the best free IDE
for delivering an enterprise quality,
– Xamarin is a tool used for cross-platform mobile app
development
– Xamarin supplies add-ins to Microsoft Visual Studio that
allows developers to build Android, iOS, and Windows
apps within the IDE
– It supports several different programming languages.
– combined with Xamarin, it can be utilized to create native
Windows, Android, and iOS applications.
4) ADB (Android Debug Bridge)
– Android Debug Bridge (adb) is a versatile command-line
tool that allows you to communicate with a device.
– adb is included in the Android SDK Platform-Tools package
– It is a client-server program that includes three components:
• A client, which sends commands. The client runs on your
development machine.
• A daemon (adbd), which runs commands on a device.
The daemon runs as a background process on each
device.
• A server, which manages communication between the
client and the daemon. The server runs as a background
process on your development machine.
Android Development Tools(ADT)
5) AVD Manager
– AVD Manager is Android Virtual Device.
– The AVD Manager is an emulator used to run
Android apps on a computer.
– This allows developers the ability to work with all
types of Android devices to test responsiveness
and performance on different versions, screen
sizes, and resolutions.
2.3 Android Virtual Device(AVD)
• An Android Virtual Device (AVD) is a configuration
that defines the characteristics of an Android phone,
tablet, Wear OS, Android TV, or Automotive OS
device that we want to simulate in the Android
Emulator.
• The AVD Manager is an interface you can launch
from Android Studio that helps you create and
manage AVDs.
• To open the AVD Manager, do one of the following:
– Select Tools > AVD Manager.
– Click AVD Manager in the toolbar.
• To create a new AVD:
1. Open the AVD Manager by clicking Tools > AVD Manager.
2. Click Create Virtual Device
3. The Select Hardware dialog box appears. It comes with pre-
loaded with certain hardware profiles, such as Nexus,Pixel devices.
• Select a hardware profile, and then click Next.
4. The System images dialog box appears. A system image labeled
with Google APIs.
• Select the system image for a particular API level, and then click
Next.
• If not available, Click the icon to download the system image.
5. The Verify Configuration page appears. Change AVD properties
as needed, and then click Finish.

Now you get a new AVD ready for launching your apps on it.
2.4 Emulators
• The Android Emulator simulates Android devices on
computer.
• The emulator allows us to test Android applications
without using a physical device..
• The emulator provides almost all of the capabilities of a
real Android device.
• We can simulate incoming phone calls and text messages,
specify the location of the device, access the Google Play
Store, and much more.
• An Android emulator is an Android Virtual Device (AVD)
that represents a specific Android device.
• The emulator comes with predefined configurations for
various Android phone, tablet, Wear OS, and Android TV
devices.
 Advantages of emulator :
1. Flexibility: Emulator is able to simulate a variety of devices
and Android API levels. Also it comes with predefined
configurations for various Android phone, tablet, Wear OS,
and Android TV devices.
2. High fidelity (faithfulness ): The emulator provides almost
all the capabilities of a real Android device. Such as incoming
phone calls and text messages, location of the device,
hardware sensors and much more.
3. Speed: Testing the app on the emulator is faster and easier
than doing so on a physical device. For example, we can
transfer data faster to the emulator than to a device
connected over USB.
Requirements of Android Emulator
– 16 GB RAM
– 64-bit Windows, macOS, Linux, or Chrome OS
operating system
– 16 GB disk space
– HAXM 6.2.1 or later (HAXM 7.2.0 or later
recommended)
HAXM(Intel Hardware Accelerated Execution
Manager)
Run your app on the emulator
• After you have created an AVD, you can start the Android
Emulator and run an app in your project
1. In the toolbar, select the AVD from the target device menu.

2. Click Run.
Once your app is installed on your AVD, you can run it from the
virtual device. Any time you want to deploy new changes, you
need to click Run or Apply Changes again.
Dalvik Virtual Machine
• The Dalvik Virtual Machine (DVM) is an android
virtual machine optimized for mobile devices.
• It optimizes the virtual machine for memory, battery
life and performance.
• The Dalvik VM was written by Dan Bornstein.
• The Dex compiler converts the class files into the .dex
file that run on the Dalvik VM.
• Multiple class files are converted into one dex file.
• The javac tool compiles the java source file into the class file.
• The dx tool takes all the class files of your application and
generates a single .dex file. It is a platform-specific tool.
• The Android Assets Packaging Tool (aapt) handles the
packaging process.
2.5 Difference JVM & DVM
2.6 Steps to install and configure
Android Studio and SDK

• Google provides Android Studio for the Windows,


Mac OS X, and Linux platforms.
• download Android Studio from
developer.android.com homepage
Steps to install and configure
Android Studio and SDK

• Windows requirements
– Microsoft Windows 7/8/10 (32-bit or 64-bit)
– 3 GB RAM minimum, 8 GB RAM recommended (plus 1 GB
for the Android Emulator)
– 2 GB of available disk space minimum, 4 GB recommended
(500 MB for IDE plus 1.5 GB for Android SDK and emulator
system image)
– 1280 x 800 minimum screen resolution
– Intel processor for accelerated emulator(HAXM)
– Android SDK
Steps to install and configure
Android Studio and SDK

• 1)launch android-studio-ide-181.5056338-windows.exe to
start the installation process. Android Studio Setup dialog
box shown in Figure 1.
Steps to install and configure
Android Studio and SDK

• 2)Clicking Next provides the option to choose


Components
Steps to install and configure
Android Studio and SDK

• 3)clicking Next, Configuration Settings window will


appear, where choose path to install Android Studio.
Steps to install and configure
Android Studio and SDK
• 4)clicked Next, and Choose Start Menu Folder panel will
appear.
Steps to install and configure
Android Studio and SDK

• 5)clicked Next. Installing panel appeared


Steps to install and configure
Android Studio and SDK
• 6)After clicking Next, the installer presented the Completing
Android Studio Setup panel.
Steps to install and configure
Android Studio and SDK
• 7)The first time Android Studio runs, it presents a Complete
Installation dialog box that offers the option of importing
settings from a previous installation.
Steps to install and configure
Android Studio and SDK
• 8)The first time Android Studio runs, it presents a Complete
Installation dialog box that offers the option of importing
settings from a previous installation.
Steps to install and configure
Android Studio and SDK
• 9)clicked OK, and was rewarded with the following splash
screen:
Steps to install and configure
Android Studio and SDK
• 10)Finding Available SDK Components message box.
Steps to install and configure
Android Studio and SDK
• 11) Android studio Setup wizard appears
Steps to install and configure
Android Studio and SDK
• 12)clicked Next, and the wizard invited me to select an
installation type.
Steps to install and configure
Android Studio and SDK
• 13)Choose a user interface theme.
Steps to install and configure
Android Studio and SDK
• 14)clicked Next. Android Studio next provided the
opportunity to verify settings.
Steps to install and configure
Android Studio and SDK
• 15) clicked Finish and Android Studio began the process of
downloading SDK components.
Steps to install and configure
Android Studio and SDK
• 16)When the Downloading Components window has done
its work, it will present you with a Finish button. Click on it.
• 17)Finally, I clicked Finish to complete the wizard.
The Welcome to Android Studio dialog box appeared.
Describe various installation steps of android studio and its
environment.
• Step1:
Go to Android https://developer.android.com/studio to get the Android Studio executable
or zip file.
• Step 2:
• Click on the Download Android Studio Button.
• Click on the “I have read and agree with the above terms and conditions” checkbox
followed by the download button
• Click on the Save file button in the appeared prompt box and the file will start
• downloading.
• Step 3:
After the downloading has finished, open the file from downloads and will prompt the
following dialog box. Click on next. In the next prompt, it’ll ask for a path for installation.
Choose a path and hit next.
• Step 4:
It will start the installation, and once it is completed, it will be like the image shown below.
• Step 5:
Once “Finish” is clicked, it will ask whether the previous settings need to be imported [if
the android studio had been installed earlier], or not. It is better to choose the ‘Don’t
import Settings option’. Click the OK button.
• Step 6:
This will start the Android Studio. Meanwhile, it will be finding the
available SDK components.
• Step 7:
After it has found the SDK components, it will redirect to the Welcome
dialog box. Choose Standard and click on Next. Now choose the theme,
whether the Light theme or the Dark one. The light one is called the
IntelliJ theme whereas the dark theme is called Dracula. Choose as
required. Click on the Next button.
• Step 8:
Now it is time to download the SDK components. Click on Finish.
Components begin to download let it complete. The Android Studio has
been successfully configured. Now it’s time to launch and build apps. Click
on the Finish button to launch it.
• Step 9:
Click on Start a new Android Studio project to build a new app.

You might also like