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

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.

主站蜘蛛池模板: 沁阳市| 富裕县| 太白县| 濮阳县| 萝北县| 张家口市| 黄龙县| 永兴县| 榆社县| 大荔县| 南雄市| 林甸县| 卫辉市| 旅游| 三台县| 巨鹿县| 东阿县| 轮台县| 赤壁市| 镇巴县| 汽车| 海盐县| 南溪县| 沽源县| 洪江市| 兴隆县| 拜泉县| 株洲市| 庆城县| 平利县| 新邵县| 万山特区| 南涧| 瓦房店市| 莱阳市| 辽阳市| 平和县| 修武县| 中阳县| 木兰县| 闽侯县|