IT tutorials
 
Mobile
 

Beginning Android 3 : Set Up the Emulator

10/17/2011 9:00:08 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
The Android tools include an emulator, a piece of software that pretends to be an Android device. This is very useful for development—it not only enables you to get started on your Android development without a device, but also enables you to test device configurations for devices that you do not own.

The Android emulator can emulate one or several Android devices. Each configuration you want is stored in an Android Virtual Device (AVD).

If you do not have the SDK and AVD Manager running, you can run it via the android command from your SDK's tools/ directory, or via Window => SDK and AVD Manager from Eclipse. It opens with a screen listing the AVDs you have available; initially, the list will be empty, as shown in Figure 1.

Figure 1. Android SDK and AVD Manager Android Virtual Devices list

Click the New button to create a new AVD file. This opens the dialog box shown in Figure 2, where you can configure how this AVD should look work.

Figure 2. Adding a new AVD

You need to provide the following:

  • A name for the AVD: Since the name goes into files on your development machine, you are limited by the file name conventions for your operating system (e.g., no backslashes on Windows).

  • The Android version (target) you want the emulator to run: Choose one of the SDKs you installed via the Target drop-down list. Note that in addition to "pure" Android environments, you will have options based on the third-party add-ons you selected. For example, you probably have some options for setting up AVDs containing the Google APIs, and you will need such an AVD for testing an application that uses Google Maps.

  • Details about the SD card the emulator should emulate: Since Android devices invariably have some form of external storage, you probably want to set up an SD card, by supplying a size in the associated field. However, since a file will be created on your development machine of whatever size you specify for the card, you probably do not want to create a 2GB emulated SD card. 32MB is a nice starting point, though you can go larger if needed.

  • The "skin" or resolution the emulator should run in: The skin options you have available depend upon what target you chose. The skins let you choose a typical Android screen resolution (e.g., WVGA800 for 800×480). You can also manually specify a resolution when you want to test a nonstandard configuration.

You can skip the Hardware section of the dialog box for now, as changing those settings is usually only required for advanced configurations.

The resulting dialog box might look something like Figure 3.

Figure 3. Adding a new AVD (continued)

Click the Create AVD button, and your AVD stub will be created.

To start the emulator, select it in the Android Virtual Devices list and click Start. You can skip the launch options for now and just click Launch. The first time you launch a new AVD, it will take a long time to start up. The second and subsequent times you start the AVD, it will come up a bit faster, and usually you need to start it only once per day (e.g., when you start development). You do not need to stop and restart the emulator every time you want to test your application, in most cases.

The emulator will go through a few startup phases, the first of which displays a plain-text ANDROID label, as shown in Figure 4.

Figure 4. Android emulator, initial startup segment

The second phase displays a graphical Android logo, as shown in Figure 5.

Figure 5. Android emulator, secondary startup segment

Finally, the emulator reaches the home screen (the first time you run the AVD; see Figure 6) or the keyguard (see Figure 7).

Figure 6. Android home screen

If you get the keyguard, press the Menu button or slide the green lock on the screen to the right, to get to the emulator's home screen.

Figure 7. Android keyguard
 
Others
 
- Getting Started with XNA : Your First XNA Project (part 3) - Examining the Solution in More Detail
- Getting Started with XNA : Your First XNA Project (part 2) - Moving the Graphic
- Getting Started with XNA : Your First XNA Project (part 1)
- iPhone : Working with View Controllers - Building a Simple Two-Item Menu & Adding a Segmented Control
- iPhone : Working with View Controllers - Developing with Navigation Controllers & Utility Function
- Fundamentals of Java ME MIDP Programming : MIDP Security Model (part 3) - The Security Model in Practice
- Fundamentals of Java ME MIDP Programming : MIDP Security Model (part 2)
- Fundamentals of Java ME MIDP Programming : MIDP Security Model (part 1) - The X.509 PKI & Certification Paths
- Fundamentals of Java ME MIDP Programming : Non-GUI APIs in MIDP
- iPad : Advanced Wi-Fi Options (Hidden or Undiscoverable Networks)
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us