Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null values for gyroscope #14

Open
ccoroner opened this issue Nov 9, 2015 · 6 comments
Open

null values for gyroscope #14

ccoroner opened this issue Nov 9, 2015 · 6 comments

Comments

@ccoroner
Copy link

ccoroner commented Nov 9, 2015

Hi Tom,

first of all, thank you for your implementation! I really appreciate your work.

Sadly, I found gyro.js to return "null" for gyroscope data (alpha, beta and gamma) on my Nexus 5 using Android 6 and Chrome 46.0.2490.76 for some reason. I cannot reproduce this bevahiour on other Nexus 5 running Android 5 and exactly the same browser version.
Is there any particular setting related to accessing the gyroscope in Android 6?

@tomgco
Copy link
Owner

tomgco commented Nov 10, 2015

Is there any particular setting related to accessing the gyroscope in Android 6?

I haven't used Android 6 yet, so I couldn't say for sure, but it seems that it should be supported. Could it be that you are using incognito? Or that your device could be in a power saving mode, disabling the devicemotion api?

@ccoroner
Copy link
Author

Thanks for your reply!

I doublechecked that power saving mode is off as well as incognito mode. The browser settings are set to very "liberate" allowing everything (Cookies, JS, GPS and so on).
The perplexing point is that accelerometer data is captured well and their values are sound while the gyroscope data is "null" for every event.

Probably there is something wrong with Chrome on this device. Gyro.js works fine with Firefox and Opera mobile on the same device. So, this is probably not an issue of your software.

@tomgco
Copy link
Owner

tomgco commented Nov 12, 2015

Probably there is something wrong with Chrome on this device. Gyro.js works fine with Firefox and Opera mobile on the same device. So, this is probably not an issue of your software.

Could you provide the example code that you are using in Chrome 46 on the andriod? So I can try it out?

@ccoroner
Copy link
Author

Sure, here come's the code. (I attached ".txt" to the filename for uploading but it runs as-is with ".html" suffix.)

gyrotest.html.txt

I just tested again: One device is perfectly fine, the other is saying "null" for alpha, beta and gamma.

@ihart
Copy link

ihart commented Mar 15, 2016

Hi guys, did you ever resolve this? I ran into a similar problem a couple of months ago and, after doing a little research, it seemed like it had something to do with Android 6.0.1 failing to actually provide deviceorientation values (yet adding a deviceorientation listener to the Window). Do you know if this is the case?

@mattandrews
Copy link

I'm seeing this on my Nexus 5 on Firefox, but it works fine on Chrome. Demo here: https://jsfiddle.net/kh87dLe9/2/embedded/result/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants