简体   繁体   中英

Sony Xperia Smartwatch MN2 how to get the accelerometer value?

I have studied Sony Smartwatch MN2 for couples of week. I still don't get how to use their SDK to get the value from Smartwatch's accelerometer. I already read the documents. But it doesn't explain too much. The example sensor code run also, but it only showed "READ ME". I want to know how to get the value from Smartwatch's accelerometer. If someone know how and willing help me. I will be very thankful.

The SampleSensor extension in the SDK is a great example of how the sensor API works and shows the basics on how to:

  • create a AccessorySensorEventListener
  • register the listener using the AccessorySensorManager
  • implement the onSensorEvent method of the AccessorySensorEventListener interface to get the sensor data from the SmartWatch.

If you install the example extension, you will need to start it on the SmartWatch and will then see the sensor data of the three axis displayed on the SmartWatch.

The "READ ME" text is displayed in the extension settings on the phone, and is not really what you are looking for.

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