Simulating Acceleration with the Emulator

,

At times it may be difficult to test an app directly on a real device, such as when you are developing an app for a new version of the Windows Phone SDK that has not yet been rolled out to phone devices. Fortunately, the emulator has a tool for simulating the accelerometer, which can be accessed by clicking on the Additional Tools button of the emulator menu (see Figure 16.2).

Image

FIGURE 16.2 Click the bottom arrow on the emulator menu to launch the Additional Tools window.

The Accelerometer tab of the Additional Tools window allows you to manipulate the position of the virtual device; moving the small red circle affects the reading taken by the Accelerometer class (see Figure 16.3).

Image

FIGURE 16.3 The emulator’s accelerometer simulator.


Note

Within the emulator, the accelerometer is not subject to environmental effects, and readings taken within the emulator are perfectly stable.

Although the emulator provides the means to test code that relies on the accelerometer, it is important to test your code on an actual device, to see how it behaves in real-world conditions.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.89.125