Calibrating the Accelerometer

The built-in Accelerometer does not provide calibration support out of the box. Moreover, there is no systemwide calibration setting that your app can update. It is up to your app to have the user place the phone in a level position, calculate an offset value, and save the offset value in isolated storage.

The custom EnhancedAccelerometer provides support for calibrating a device placed on a level surface. It includes the following two calibration related methods:

Image bool CanCalibrate()

Image bool Calibrate()

CanCalibrate

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.