October 20, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Interacting with the Android Emulator, Page 2

  • July 26, 2011
  • By Lauren Darcey & Shane Conder
  • Send Email »
  • More Articles »

How Can I Control and Interact with the Android Emulator?

You can use your mouse and keyboard to interact with the emulator after it's running. Clicking on the emulator screen simulates finger touches. Your keyboard can be used to send specific emulator commands, or as an input method if the AVD specifies a hardware keyboard. Some of the most common commands used on a regular basis include

  • Back [ESC button]
  • Call [F3]
  • End [F4]
  • Volume Up [KEYPAD_PLUS, Ctrl-5]
  • Volume down [KEYPAD_MINUS, Ctrl-F6]
  • Switching orientations [KEYPAD_7, Ctrl-F11/KEYPAD_9, Ctrl-F12]

You can customize your emulator experience with startup options. These can be set on the Target tab of your debug and run configurations from within Eclipse. For a complete list of Emulator startup options and keyboard commands, see the Emulator Startup Options and Emulator Keyboard Mapping sections in the SDK documentation.

You can also interact with an emulator from within the DDMS tool or Eclipse perspective (Figure 3). Use the Emulator Control panel to specify telephony status, simulate incoming voice calls and SMS messages, and send location data to the emulator for testing purposes.


Using DDMS Tool to Control Android Emulator
Click here for larger image

Figure 3. Using DDMS Tool to Control Android Emulator

What Are the Android Emulator's Limitations?

The emulator is a useful testing tool, but it does not truly replicate how your users will experience your application on real mobile devices, with real networks, true hardware sensors, accurate representation of performance, and unique input characteristics. The emulator can take you only so far. It's fantastic for developer testing, automated testing, and testing of device configurations you cannot get your hands on. It falls short when it comes to making or receiving real phone calls and simulating hardware like cameras, sensors and GPS, USB, and Bluetooth. We've also found that OpenGL graphics and video are best tested on real devices.

Conclusion

The Android emulator is a powerful tool, when used appropriately. You can safely and easily deploy and test applications from the comfort of your desk, without pesky cords, random USB drivers, etc. That said, the emulator has limitations; it's not a true device, so it doesn't provide the completely authentic experience that users actually will have.

About the Authors

Shane Conder Shane Conder and Lauren Darcey--Contributing Editors, Mobile Development--have coauthored two books on Android development: an in-depth programming book entitled Android Wireless Application Development (ISBN-13: 978-0-321-62709-4) and Sams Teach Yourself Android Application Development in 24 Hours (ISBN-13: 978-0-321-67335-0). When not writing, they spend their time developing mobile software at their company and providing consulting services.

   Email       |               Blog       |               Twitter

Lauren Darcey

Tags: Android

Originally published on http://www.developer.com.

Page 2 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel