No data received for Sensor.TYPE_ROTATION_VECTOR on Kindle Fire HDX
I have an app which uses the device's motion sensors to control part of the UI, and in testing on a new Kindle Fire HDX 7", I'm finding that Sensor.TYPE_ROTATION_VECTOR doesn't supply any data for sensor events. Specifically, I declare a sensor listener for this type as such: Sensor rotationSensor = sensorManager.getSensor(Sensor.TYPE_ROTATION_VECTOR); sensorManager.registerListener(myListener, rotationSensor, sensorDelay); The problem appears in myListener's onSensorChanged() handler; the supplied SensorEvent parameter contains nothing but zeros in its [b]values[/b] field, where it should have numbers corresponding to the output from the sensor (accelerometer + gyroscope). Just to be clear, I'm not looking for anyone to debug my code for me; this is mature code that is working on a wide range of other devices, including the second-gen Fire HD. As such, I can only assume that it's a bug in the HDX's handling of this sensor data. Sterling
Hi Sterling, In your sample code you wrote: Sensor rotationSensor = sensorManager.getSensor(Sensor.TYPE_ROTATION_VECTOR); Did you mean to type: Sensor rotationSensor = sensorManager.get[b]Default[/b]Sensor(Sensor.TYPE_ROTATION_VECTOR); Thanks.
Sorry, should have mentioned - I have a wrapper class for [b]SensorManager[/b] which abstracts out some differences from early versions of the SDK. My [b]getSensor()[/b] call exactly duplicates the functionality in [b]SensorManager.getDefaultSensor()[/b] (per the AOSP). I probably ought to rename it to [b]getDefaultSensor()[/b], but this is code that predates Cupcake - as I said, it's mature. I've just confirmed that calling through to the system's [b]getDefaultSensor()[/b] doesn't change the behavior at issue here. Nor does removing my wrapper class and replacing it with the system's [b]SensorManager[/b]. In both cases, [b]onSensorChanged()[/b] for this sensor type still supplies zeros in the [b]event.values[/b] parameter. Sterling
Bump... I can't believe I'm the only one seeing this issue. At the very least, I need to know (from Amazon) how widespread the problem is, so that I can disable gyroscope support on affected devices. Is this only on the 7" HDX? Or is it in Mojito, and thus will affect all 3rd-gen Kindle Fires? Thanks, Sterling
Hi Bipin, Thanks for responding. Here are the values you requested: Build.MODEL == KFTHWI Build.VERSION.INCREMENTAL == 18.104.22.168_user_302075320 Any thoughts? Might this actually be bad hardware in my tablet? Sterling
Hello? Any response to the information you requested would be most welcome. This app is pretty much dead in the water for the Fire HDX pending resolution of this issue. Because of this delay, we can't push other updates to the Appstore either, and we have users complaining. Or would we be better off to just remove support for all 3rd-gen Fire devices from this app? Thanks for any help you can provide, Sterling
Lacking any response here, I'm going to assume that this is a hardware problem on my specific tablet (as you suggested), and will start the process for replacement under warranty. We'll also be removing the app from sale to all third-gen Fire devices until such time as we can test on the replacement hardware. Thanks for all your help.
My HDX has now been updated to 22.214.171.124, with no change to the gyroscope behavior. I'd like to ask a favor of anyone else with third-gen Kindle Fire hardware (either HDX model, or the new HD7 with Fire OS 3). I've created a minimal test app that exhibits this problem, which you can download from here: Source
http://terratime.net/GyroTest.apk The app simply shows the real-time output from the 3 rotation vectors (the [b]event.values[/b] array). On my HDX these never budge from zero; on any other device with a gyroscope (including the second-gen HD7) they show an ever-changing stream of floating-point numbers. Thanks again, Sterling
Hi Sterling, Sorry for late attendance. I have tested the apk in HDX 7 and 8.9 and HD 7 (3rd gen) I got non zero values displayed in the screen. I think the there might be hardware issues with your device. Can you contact our customer care center for the device replacement? Thanks.