0% found this document useful (0 votes)
13 views3 pages

Android Virtual Devices Unit2

Android Virtual Devices (AVD) are emulated Android devices that allow developers to test apps on various screen sizes and Android versions without needing a physical device. AVDs consist of components like device profiles, system images, and storage configurations, and can be created using Android Studio. The document also outlines the core components of Android applications, their lifecycle, and tools used in Android development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Android Virtual Devices Unit2

Android Virtual Devices (AVD) are emulated Android devices that allow developers to test apps on various screen sizes and Android versions without needing a physical device. AVDs consist of components like device profiles, system images, and storage configurations, and can be created using Android Studio. The document also outlines the core components of Android applications, their lifecycle, and tools used in Android development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Android Virtual Devices

Android Virtual Devices (AVD) are emulated Android devices that run on your computer using the
Android Emulator.

, such as different screen sizes, Android versions, and hardware features like cameras, GPS, and
sensors.

Key Features of AVD:

Feature Description
Emulates different screen sizes, resolutions, and hardware features like
Device Simulation
camera, sensors, etc.
Android Version Allows you to run and test apps on different Android API levels.
Multiple
You can create multiple AVDs for phones, tablets, wearables, TV, etc.
Configurations
Speeds up development by enabling quick app deployment and testing
Fast Testing
on virtual devices.

⚙️AVD Components:

 Device: The hardware profile (e.g., Pixel 6, Nexus 5).


 System Image: The Android OS version to run (e.g., Android 12, Android 14).
 Storage: Internal memory and SD card.

🛠️How to Create an AVD (using Android Studio):

1. Open Android Studio.


2. Go to Tools > Device Manager.
3. Click "Create Device".
4. Choose a hardware profile.
5. Select a System Image (Android version).
6. Configure settings and click Finish.

✅ Benefits of AVD:
 No need to connect a real device.
 Can simulate various Android versions and screen sizes.
 Helps test how apps behave on different devices and configurations.

-Understanding Anatomy of Android Application

An Android application is made up of several core components and files that work together to
deliver functionality.

Core Components of Android App


Component Description

Represent a single screen with a UI (e.g., Login screen).

Java

public class MainActivity extends Activity {

}
Activities

Background tasks with no UI (e.g., playing music).

Java
Services
public class ServiceName extends Service {

Broadcast
Receivers Listen for system-wide broadcasts (e.g., battery low, SMS received).

Manage app data and share it between apps (e.g., Contacts).

Java

Content
Providers public class contentProviderName extends ContentProvider
{

public void onCreate()}


🔁 4. Activity Lifecycle (Simplified)

1. onCreate() – App is starting.


2. onStart() – App is visible to the user.
3. onResume() – App is now interacting with the user.
4. onPause() – User leaves current activity.
5. onStop() – App is no longer visible.
6. onDestroy() – App is shut down.

🧪 5. Tools Used in Android Development


Tool Purpose

Android Studio Official IDE for Android app development.

Emulator (AVD) Test apps on virtual devices.

ADB (Android Debug Bridge) Command-line tool for debugging.

You might also like