简体   繁体   中英

Can I use the Motion class in a Windows Phone 8.1 app?

Working on a project for a client must use Windows Phone 8.1 (on Lumia 640 phones). The project includes measuring the acceleration of an object in motion. Whilst I can access the accelerometer sensor, and read the current G-forces, they include gravity in the results and so need to exclude gravity from the acceleration results.

I think we need to access a linear acceleration measurement that seems to be available from the Motion Class as part of the MotionReading structure

Looks great but I can't get Visual Studio (c#) to allow me to include the Microsoft.Devices.Sensors API in my app and Windows.Devices.Sensors (Which I can access and use) does not have the same functionality.

Anyone with experience with the Motion class and Windows Phone 8.1 can you point me in the right direction, please.

Seems like Motion class is available only for Windows Phone Silverlight only - if you create such project, the namespace should be there. However I cannot find any documentation referring to this, the Motion description says only about Windows Phone doesn't specifying if it's Silverlight or Runtime , also Migration reference doesn't help much with this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM