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

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.

主站蜘蛛池模板: 崇左市| 进贤县| 时尚| 银川市| 揭东县| 隆尧县| 昌乐县| 乡城县| 北宁市| 清远市| 达州市| 资兴市| 荆门市| 平南县| 合江县| 达孜县| 湘潭市| 揭西县| 天水市| 兴化市| 洛宁县| 浮梁县| 苍南县| 五常市| 左云县| 怀安县| 仲巴县| 邵阳县| 太仆寺旗| 香河县| 平远县| 鹰潭市| 吉水县| 吴川市| 北安市| 大邑县| 寿光市| 佛坪县| 东至县| 西畴县| 石楼县|