0% found this document useful (0 votes)
6 views5 pages

Unit 2

The document outlines the essential components for Android application development, including the Operating System, Java JDK, and Android SDK, which provide the necessary tools and environment for building Android apps. It also discusses Android Development Tools, Android Virtual Devices, emulators, and the differences between JVM and DVM, highlighting their roles in app development. Finally, it provides a step-by-step guide for installing and configuring Android Studio and the SDK to begin creating Android applications.

Uploaded by

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

Unit 2

The document outlines the essential components for Android application development, including the Operating System, Java JDK, and Android SDK, which provide the necessary tools and environment for building Android apps. It also discusses Android Development Tools, Android Virtual Devices, emulators, and the differences between JVM and DVM, highlighting their roles in app development. Finally, it provides a step-by-step guide for installing and configuring Android Studio and the SDK to begin creating Android applications.

Uploaded by

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

Mobile Application Development

Unit – 2 Installation & Configuration of Android

 Functions of Operating System, Java JDK, Android SDK

 Operating System:
The operating system is the main software that manages your computer's h/w and s/w
resources. It provides an environment for other software, like development tools, to run.
 The OS (e.g., Windows, macOS, or Linux) allows you to install and use tools like Android
Studio.
 It handles file systems, memory management, and hardware drivers needed for
development.

 Java JDK:
The JDK is a software development kit for creating Java applications. It includes tools for
writing, compiling, debugging, and running Java programs.
 Many Android apps are built using Java. The JDK helps you write Java code for your app.
 It includes the Java Compiler (to convert code into machine-readable instructions) and the
Java Runtime Environment (JRE) to test the app.

 Android SDK:
The Android SDK is a collection of tools, libraries, and emulators specifically for creating
Android apps. It helps developers build, test, and debug applications for Android devices.

 Provides APIs (Application Programming Interfaces) to access Android features like the
camera, GPS, or notifications.
 Includes tools like ADB (Android Debug Bridge) for testing apps on real or virtual
devices.
 Comes with emulators to simulate Android devices for testing.
These three components are essential for Android Application Development
Operating System: Runs development tools like Android Studio.
Java JDK: Helps you write and run Java code for Android apps.
Android SDK: Provides the tools and libraries to create apps specifically for Android
devices.

 Android Development Tools(ADT)


- Android Development Tools helped developers create Android apps.
- Although it has been replaced by Android Studio as the official tool for Android
development.
- ADT was eventually retired because Android Studio offered a better, more integrated, and
modern experience for developers, making Android development faster and easier.
- ADT was an older tool to develop Android apps using Eclipse, but it has now been replaced
by Android Studio as the official development environment.

 Android Virtual Devices (AVDs)


- Android Virtual Devices are digital copies of Android phones, tablets, or other devices that
run on your computer. They are part of the Android Emulator, which comes with Android
Studio.
- Simulate real Android devices on your computer.
- Let you test your app without needing a physical phone or tablet. - Show how your app
will look and work on different devices with various screen sizes, resolutions, and Android
versions.

-Key Features of AVDs:


1. Customizable: - You can choose the device type (e.g., phone, tablet), screen size,
resolution, and Android version. - Test how your app works in different conditions, like low
battery or slow internet.
2. Fast Testing: - Allows you to run and debug your app quickly without transferring it to a
physical device.
3. Built-in Tools: - Includes tools to simulate hardware features like GPS, camera, calls, and
messages.
4. Versatile: - Useful for testing apps on devices you don’t own.
5. It Save time and money by not needing multiple physical devices.
6. Help you identify and fix issues before releasing the app. - Allow testing on older or
newer Android versions.

 Emulator
- An emulator is a software program that copy the functions of a physical device on your computer.
- In Android development, an Android Emulator is a tool that simulates an Android phone or tablet,
allowing you to run and test apps on your computer without needing a real device.
- Key Points About Emulators:
Simulate Devices: It creates a virtual version of a physical Android device (e.g., phone,
tablet).
Testing: Developers use it to test their apps on different Android versions, screen sizes, and
resolutions.
Simulate Features: It can simulate features like the camera, GPS, touch input, and more.
Faster Development: It saves time by allowing developers to test apps quickly without
needing a physical device for each test.
In short, an emulator is like a "fake" Android device on your computer, used for testing apps in a
controlled environment.

 JVM (Java Virtual Machine)


- The JVM (Java Virtual Machine) is a program that allows a computer to run Java
applications. Here's a simple way to understand it:
- Code Execution: When you write a Java program, it is first converted into a special kind of
code called bytecode.
- The JVM reads this bytecode and translates it into machine code that your computer can
understand.
- Cross-Platform: Java programs can run on any device that has a JVM, regardless of the
operating system (Windows, Mac, Linux). This is why Java is called "write once, run
anywhere.
- Memory Management: The JVM takes care of allocating and freeing up memory, so you
don’t have to manage it manually.
- Error Handling: It also helps detect and handle errors while your program is running

 DVM (Dalvik Virtual Machine)


- The DVM (Dalvik Virtual Machine) was a key part of the Android system, designed
specifically to run apps on Android devices.
- It is similar to the JVM (Java Virtual Machine) but optimized for mobile devices.
- The DVM was replaced by the Android Runtime (ART) in newer Android versions
because ART is faster and more efficient.
What DVM Does:
1.Runs Android Apps:- The DVM executes Android app code that is written in Java and
converted into a special format called Dalvik bytecode.
2.Optimized for Mobile:- The DVM uses less memory and runs efficiently on devices with
limited resources like smartphones and tablets.
3.Supports Multiple Apps:- The DVM allows many apps to run simultaneously without
slowing down the device by using a unique instance for each app.
4.Converts Java Code:- During app development, Java bytecode (from the Java compiler) is
converted into Dalvik bytecode using a tool called dx.
Why DVM Was Used:
Mobile-Friendly:- It was designed specifically for Android's needs, focusing on saving
memory and battery life.
Multi-Tasking:- Handled multiple apps running at the same time efficiently.
In simple words, the DVM was a special engine that helped Android devices run apps smoothly
while saving memory and battery.

 Difference between JVM and DVM

JVM DVM
1. Purpose JVM Designed for running Java DVM Specifically built for
programs on computers and running Android apps on
servers. mobile devices.

2. Code Format JVM Runs Java bytecode DVM Converts Java bytecode
directly. into Dalvik bytecode for better
performance on Android.
3. Platform JVM Works on desktops, DVM Works only on Android
servers, and non-Android devices.
systems.

4. Memory Usage JVM Uses more memory, DVM Uses less memory,
suitable for devices with more optimized for low-resource
resources (like PCs). mobile devices.

5. Execution Process JVM Uses Just-In-Time (JIT) DVM Also uses JIT, but its
compilation to convert bytecode bytecode is already optimized
to machine code during for mobile devices.
runtime.

6. Multi-Tasking JVM Runs the entire program DVM Creates a separate


in a single instance. instance for each app, making it
better for multitasking on
Android.

7. Performance JVM Prioritizes overall DVM Focuses on battery and


functionality and speed for memory efficiency for mobile
desktop or server environments. devices.

8. Replacement JVM Still widely used for Java DVM Replaced by ART
applications. (Android Runtime) in modern
Android versions for faster and
more efficient performance.
 Steps to install and configure Android Studio and SDK
Step 1: Download Android Studio
1.Go to the official Android Studio Website.
2.Click Download Android Studio and save the file.

Step 2: Install Android Studio


1.Open the downloaded file and start the installation process.
2.Follow the steps on the screen:
Choose the installation folder (you can leave it as default).
Install necessary tools like the Android Virtual Device (AVD).
3.Once done, click Finish and open Android Studio.

Step 3: Set Up Android Studio


1.When Android Studio opens for the first time:
Select Standard setup (recommended settings).
Android Studio will automatically download and install the Android SDK and
required tools.

Step 4: Check Android SDK Installation


1.In Android Studio, go to File > Settings (Windows) or Android Studio > Preferences
(Mac).
2.Navigate to Appearance & Behavior > System Settings > Android SDK.
3.Make sure the necessary SDK tools (e.g., SDK Platform) are installed.

Step 5: Set Up a Virtual Device (Optional)


1.Open the Device Manager (or AVD Manager) from the toolbar.
2.Click Create Virtual Device.
3.Choose a phone model (e.g., Pixel 5), select an Android version, and download it.
4.Finish the setup, and you’ll have a virtual Android device to test your apps.

Step 6: Test Your Setup


1.Create a new project in Android Studio by selecting Empty Activity.
2.Click Run to test your app on the emulator or a connected Android device.

Tips
Ensure your computer meets the requirements (e.g., enough RAM and disk space).
Use a fast and stable internet connection for downloading files.
Keep Android Studio and the SDK up-to-date via Help > Check for Updates.
Now you’re ready to start creating Android apps.

You might also like