Windows* 8 Store App – Motion-based app sleep prevention Sample

Lana N. Lindberg, Software Applications Engineer for the Intel® Atom ™ Processor

Abstract


With the introduction of mobile devices with touch screen, a number of mobile apps do not require user input such as touch, mouse, or keyboard. This creates challenges for the developers of motion-based apps; one of them being how a device can detect if a motion-based app is in use. The Motion-based app sleep prevention sample is a Windows Store app that demonstrates how to notify the device that the motion-based app is in use by registering notifications from a sensor in the new Windows 8 environment. This app does not require user input, i.e., mouse or touch; thus, the device will enter sleep mode at the scheduled time. The application uses the gyroscope sensor and starts by connecting to the default gyrometer. It reads x, y, z angular velocities and passes the values to the 3D transform. The user can move the device in different directions and observe the image rotation in 3D based on the angular velocities. Constantly changing sensor reading notifies the device that the app is in use. 

Article


Windows* 8 Store App – Motion-based app sleep prevention Sample Whitepaper

Download Source Code


Motion-based_app_sleep_prevention.zip (1.2 MB). (Note: Build in Visual Studio 2012)

Images /Screenshot



Figure 1: Motion-based app sleep prevention (Gyroscope) Screenshot 1


Figure 2: Motion-based app sleep prevention (Gyroscope) Screenshot 2

License


Intel sample sources are provided to users under the Intel Sample Source Code License Agreement.

Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.