What are best practices for incorporating the use of sensors into my Metro style app?
-
2011年9月14日 3:24所有者For more information on how to use the Windows.Devices.Sensors.Accelerometer API, see the Accelerometer sample in the Samples gallery.
Dan Reagan | Microsoft | Windows 8 Support- 編集済み Lisa_MSMicrosoft Employee, Moderator 2011年9月14日 4:04 removed Q: and A:
すべての返信
-
2011年9月14日 6:08
In addition to the Accelerometer, there are 6 other sensor classes to choose from, depending on the capabilities of your system: Compass, Gyrometer, Inclinometer, LightSensor, OrientationSensor and SimpleOrientationSensor. Samples for each of these sensor classes can be found in the Metro Style Apps gallery.
One best practice not currently shown in the samples is to always set the desired ReportInterval, whether registering an event listener or polling (especially when polling). This ensures that the sensor driver will produce data at the rate expected by your app.
-
2011年9月21日 22:29
You also may want to check out the video and slides from the "Using location & sensors in your app" session from //BUILD/:

