Emulator vs simulator

You may hear the words emulator and simulator thrown about interchangeably. While they have a similar purpose—testing applications without the requirement of real hardware—those words should be used with care. A simulator tool works by creating a testing environment that behaves as close to 100 percent of the same manner as the real environment; however, it is just an approximation of the real platform. But this does not mean that the code targeted for a simulator will run on a real device, because it is compatible only at the source-code level. Simulator code is often written to be run as a software program running on a desktop computer with Windows DLLs or Linux libraries that mimic the application programming interfaces (APIs) available on the real device. In the build environment, you typically select the CPU type for a target, and that is often x86/Simulator. In an emulated environment, the target of our projects is compatible at the binary level. The code we write works on an emulator as well as the real device. Of course, some aspects of the environment differ in terms of how certain functions are implemented on an emulator. For example, a network connection on an emulator will run through your development machine's network interface card, whereas the network connection on a real phone runs over the wireless connection such as a GPRS, EDGE or EVDO network. Emulators are preferred because they more reliably prepare us for running our code on real devices. Fortunately, the environment available to Android developers is an emulator, not a simulator.

Android Emulator from Eclipse, but you are encouraged to examine the command-line options available in the emulator because they will undoubtedly be of value as you progress to building more complex Android applications and your application testing requirements grow.

0 0

Post a comment