Utilizing additional features of the emulator
The provided emulators are equipped with some additional features that simplify the testing of applications. In this recipe, you will learn how to use such features of the smartphone-based emulators available within the IDE.
Getting ready
To complete this recipe, you need an automatically generated project.
How to do it...
To utilize additional features provided by the emulator of a smartphone, you need to perform the following steps:
- Select
Fit to Screen
to automatically adjust the size of the emulator. You could specify zoom directly using theZoom
option. - Use the
Rotate Left
andRotate Right
options to rotate the emulator, either counterclockwise or clockwise, respectively. - Check various input modes by clicking on the small icons located on the right-hand side of the emulator, such as:
Single Point Mouse Input
Single Point Touch Input
Multi-touch Input
- Run the application in Mobile Emulator (...) WXGA 4.5 inch 1GB. Then, wait until the application is loaded.
- Click on the
Tools
option (double arrow) to open the window with the additional features available within the emulator, which are organized into tabs, such as:- Accelerometer: This is used to simulate data from the accelerometer sensor
- Location: This is used to simulate the current GPS location
- Screenshot: This is used to capture and save the screenshot from the emulator
- Network : This is used to enable or disable the network for an emulator as well as to specify the network speed and signal strength
- SD Card: This uses the local folder as an SD card within the phone
- Checkpoints: This is used to manage the saving states of the emulator
- Optional Settings: This is used to mark which hardware should be emulated
- Notifications: This is used to simulate push notifications sent to the application
- NFC: This is used to emulate NFC-based scenarios
See also
- The Running the application recipe
- The Creating a unit test and Running a set of tests recipes in Chapter 9, Testing and Submission