简体   繁体   中英

Android Emulator vs Real Device

开发人员应该注意哪些不同之处?

I am aware of these limitations:

  1. Pre-installed software. Real device can have preinstalled a lot more applications than emulator.
  2. You cannot use "capture" photo/video functions in emulator.

According to emulator documentation , its limitations are:

The functional limitations of the emulator include:

  • No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.

  • No support for USB connections

  • No support for device-attached headphones
  • No support for determining network connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insert/eject
  • No support for Bluetooth

IMO you can use emulator to simplify UI development, to view UI on "device screen", to be sure that app layout is ok, app can be run, you can test some special cases by simulating gps position, network speed or messaging etc. But testing on real device is a must.

With the 1.5 SDK the following limitations exists (from the SDK website ):

  • No support for placing or receiving actual phone calls. You can simulate phone calls placed and received) through the emulator console, however.
  • No support for USB connections
  • No support for camera/video capture (input).
  • No support for device-attached headphones
  • No support for determining connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insertion/removal
  • No support for Bluetooth
  • No support for Multitouch

Based on experience I've noticed the following differences in actual developemnt:

  • There are bugs you'll be able to ignore in the emulator that will crash the device (not closing Cursors for example)
  • You interact with the device differently than the emulator. I use landscape mode a lot more with the real device than I do with the emulator.
  • There's a different CPU. Things that are fast on your emulator will be slower on the real device.
  • You can dogfood with the device. It is harder to dogfood with the emulator.

There is a google group here if you need real device testers.

人们无法使用模拟器测试触摸事件,模拟器必须通过鼠标点击模拟器进行测试,任何开发人员都要开发基于触摸屏的应用程序。

I'd say the main thing is that there are several "real devices" currently using Android, and there will be more, with different hardware endowments -- some will have GPS and some won't, ditto for touchscreen, real keyboard as opposed to virtual on-screen one, camera resolution, etc, etc.

While the OS will do a lot of the heavy lifting for you, you still want to make sure your design a user experience that makes sense on every Android device you intend to support, despite the variation in their HW features -- in this sense, designing applications for Android is more similar to designing them for, say, Linux, Windows, or the Web (cater for a wide variety of hardware-configuration details), rather than eg Macs or iPhone (where you need to consider a much narrower set of possible HW configurations).

The emulator is (or tries to be;-) "one" Android device -- but there will be others ("real" ones;-) with different screen resolutions, input peripheral devices, etc, etc...

One comment regarding google accounts: With version 8 of the google APIs for Android 2.2, you can add a google account on the device. However, it will only allow authentication for tests of the google APIs (eg google documents) but not syncing of contacts etc.

这是一个错误,因为尝试了摄像头和视频支持(错误):摄像头和视频意图在“捕获”后不会将其输出存储在MediaStore数据库中。

In simple term an emulator is a device that runs on your computer screen whereas a real device is something you can hold. There may be a few differences when it comes to use such as you can not use an em. I have written a detailed post about this you may consider reading.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM