Windows Phone Dev Notes- Differences in Acceleration Sensor Data Acquisition Methods of WP7 OS 7.0 and 7.1

Windows Phone Dev Notes- Differences in Acceleration Sensor Data Acquisition Methods of WP7 OS 7.0 and 7.1

Problem Description

    For acceleration sensors, data acquisition is the most basic event. However, the OS 7.0 and OS7.1 versions are different. This problem stems from a post on the Chinese technical forum: About the compatibility of the CurrentValueChanged event in Accelerometer .

analysis

    From the "MSDN: Accelerometer Class " webpage, ReadingChanged has been deprecated in the current WP 7.5 OS, please use CurrentValueChanged instead .

    For ReadingChanged , this is the explanation: Obsolete. Occurs when new data arrives from the accelerometer. This method is deprecated in the current release. Applications should use the CurrentValueChanged event of the SensorBase<TSensorReading> class instead.

Conclusion

    When creating a new project in WP SDK 7.1, you can choose to target OS 7.0 or OS 7.1. If you want to write app for debugging for the previous system of mango, you should choose OS 7.1, which corresponds to the CurrentValueChanged event, and OS 7.0, or

ReadingChanged event.

Reference: https://cloud.tencent.com/developer/article/1017687 Windows Phone Dev Notes-About the difference between the acceleration sensor data acquisition methods of WP7 OS 7.0 and 7.1-Cloud + Community-Tencent Cloud