Sunday, March 4, 2012

Keep Accelerometer Running While The Screen Is Locked

On N9, the accelerometer is disabled while the screen is locked. In order to enable it all the time, set the "alwaysOn" property to true:


    accelerometer = new QAccelerometer(this);
    accelerometer->setProperty("alwaysOn", true);

This is a Meego-specific property, and it is only documented here.

No comments:

Post a Comment