[SOLVED] Device Orientation not working on chrome / sololearn | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

[SOLVED] Device Orientation not working on chrome / sololearn

How exactly can I get it to work? I had copied the example from the Mozilla FireFox documentation and when I ran the program the alpha and gamma values returned null. Can someone please tell me what ive got wrong here? https://code.sololearn.com/W8Tfa6WTOsYW/?ref=app

11th Sep 2018, 6:53 PM
Jay
Jay - avatar
17 Answers
+ 3
The beta and gamma values showed up for me on SoloLearn (didn't see alpha in the code, assumed it's not a thing). My SoloLearn app is attached to the latest version of Chrome (69.0.3497.91) for Android (8.0.0 moto g6). I found Android System WebView disabled for me now as well. https://www.quora.com/Why-is-Android-system-web-view-disabled-in-Android-7 Not sure if this helps.
12th Sep 2018, 11:24 AM
Janning⭐
Janning⭐ - avatar
+ 5
FIXED IT!!!!!!! Since webview is now in Chrome, I uninstalled Chrome and then reinstalled it. Device Orientation Events work (incl. Alpha) but motion events do not work. But thats fine - only needed orientation.
12th Sep 2018, 12:01 PM
Jay
Jay - avatar
+ 5
Thanks Burey and Janning⭐ !
12th Sep 2018, 12:16 PM
Jay
Jay - avatar
+ 4
There is a known bug in later updates of Android WebView Try uninstalling it in this link (it will revert to your device's default version) https://play.google.com/store/apps/details?id=com.google.android.webview version 49.0.2623.105 works for me
11th Sep 2018, 6:59 PM
Burey
Burey - avatar
+ 4
Jay great to hear that🤘
12th Sep 2018, 12:03 PM
Burey
Burey - avatar
+ 3
What android version on your device and what device?
11th Sep 2018, 7:21 PM
Burey
Burey - avatar
+ 3
Seems you can enable it via the developer options menu in android https://www.androidpolice.com/2016/07/20/google-explains-chrome-will-become-webview-android-7-0/
11th Sep 2018, 7:23 PM
Burey
Burey - avatar
+ 3
Can you try the code in here? It will show which device motion/orienatation abillities https://github.com/wagerfield/parallax/issues/194
11th Sep 2018, 7:38 PM
Burey
Burey - avatar
+ 3
I'll post here if i happen to stumble on more info about this
11th Sep 2018, 8:04 PM
Burey
Burey - avatar
+ 3
Glad to help. :)
12th Sep 2018, 12:17 PM
Janning⭐
Janning⭐ - avatar
+ 2
Thanks for the response! I checked the link and it says "disabled" and there was no option to install nor uninstall. Then I checked my apps to see if I had this app and couldn't find it. Not really sure what to do now
11th Sep 2018, 7:16 PM
Jay
Jay - avatar
+ 2
Samsung Galaxy S6 Android: 7.0
11th Sep 2018, 7:26 PM
Jay
Jay - avatar
+ 2
Says its not supported for me I did go on the dev options
11th Sep 2018, 7:44 PM
Jay
Jay - avatar
+ 2
Device Orientation and Motion were working for me 6-12 months ago. Not really sure whats happened. I am also unable to disable webview in the developer options
11th Sep 2018, 7:58 PM
Jay
Jay - avatar
+ 2
Burey It works in Samsung Internet and firefox but not google chrome nor sololearn
11th Sep 2018, 10:07 PM
Jay
Jay - avatar
+ 1
That's weird :(
11th Sep 2018, 8:02 PM
Burey
Burey - avatar
+ 1
Thanks for your help anyway!
11th Sep 2018, 8:03 PM
Jay
Jay - avatar