官术网_书友最值得收藏!

Setting up Android emulators

Android SDK comes with emulators capable of running applications we develop. We will need it for our project! The purpose of an emulator is to simulate a device and displays all its activity windowed on your computer. What can we do with it? We can prototype, develop, and test--all this without a hardware device. You can emulate phones, tablets, wearables, and TV devices. You can create your own device definitions, or you can use predefined emulators.

The good thing about emulators is that they are fast. In many situations, it will take less time to run an application on an emulator instance than on a real hardware device.

Working with the emulators is just as easy with a real hardware device. For gestures, you use your mouse, and for input, your keyboard.

Emulators can do anything a real phone does! You can easily send incoming phone calls and text messages! You can specify the location of the device, send fingerprint scans, adjust network speed and status, or even simulate battery properties. Emulators can have a virtual SD card and internal data storage, both of them you can use to send real files to that space.

Android Virtual Device (AVD) configuration is used to define an emulator. Each AVD instance works as a completely independent device! For the purpose of creating and management of AVDs, we use the AVD Manager. An AVD definition holds a hardware profile, system image, storage area, skin, and other important properties.

Let's play with it! To run the AVD Manager, do one of the following:

Select Tools | Android | AVDManager or click on the AVDManager icon in the toolbar:

It displays all AVDs you've already defined. As you can see, we don't have any yet!

What can we do here? We can do the following:

  • Create a new AVD
  • Edit an existing AVD
  • Delete the existing AVD
  • Create hardware profiles
  • Edit an existing hardware profile
  • Delete an existing hardware profile
  • Import/export definitions
  • Start or stop the AVD
  • Clear data and reset the AVD
  • Access the AVD .ini and .img files on the filesystem
  • View the AVD configuration details

To obtain the AVD instance, you can either create a new AVD from the beginning or duplicate an existing AVD and modify it by need.

主站蜘蛛池模板: 宁蒗| 光泽县| 随州市| 扬州市| 天门市| 紫金县| 姚安县| 内江市| 绵竹市| 江达县| 宁陕县| 柞水县| 乌鲁木齐市| 建阳市| 武安市| 讷河市| 黎城县| 武安市| 固原市| 临澧县| 临清市| 扶余县| 吉木萨尔县| 沙坪坝区| 汉中市| 喀喇沁旗| 称多县| 湘潭县| 四子王旗| 蓬莱市| 乌鲁木齐县| 永春县| 叙永县| 师宗县| 延边| 庄河市| 南城县| 临沭县| 金阳县| 汽车| 左贡县|