+ 10

RIP motion API

hello, I discovered that the device motion API and device inclination API do not work anymore, yet a few months ago these APIs worked perfectly, I tried locally to be sure and it did not work either ... Does anyone have any information please?

16th May 2018, 12:31 PM
Maxımee
Maxımee - avatar
15 Respuestas
+ 16
this is probably caused by a webview update affecting the 'devicemotion' event try going here and remove (reverts to the system original webview version) https://play.google.com/store/apps/details?id=com.google.android.webview here is a link regarding this in stackoverflow (also a link there for the issue with greater details) https://stackoverflow.com/questions/47632828/device-orientation-and-motion-on-webview-and-chrome
16th May 2018, 6:11 PM
Burey
Burey - avatar
+ 19
This had happened to me also once with a browser update. Most probably that time it was just a bug and it was fixed in the next update. https://www.sololearn.com/Discuss/915546/?ref=app EDIT : It doesn't seem to work for me either.
16th May 2018, 1:56 PM
Swapnil Srivastava
Swapnil Srivastava - avatar
+ 11
np ␥Maximee it just happened to me as well and it was just a shot in the dark 🎯
16th May 2018, 6:38 PM
Burey
Burey - avatar
+ 9
Burey omg it work 🙉🙉 thank you so much you are great 😍😍
16th May 2018, 6:34 PM
Maxımee
Maxımee - avatar
+ 8
https://code.sololearn.com/WhoG2aCIffJu/?ref=app few months ago it was working perfectly :/
16th May 2018, 1:34 PM
Maxımee
Maxımee - avatar
+ 8
nope :/ I've send the code link at lot of friends and the code doesn't work for them either
16th May 2018, 1:43 PM
Maxımee
Maxımee - avatar
+ 8
ok thank you Swapnil Srivastava :)
16th May 2018, 1:59 PM
Maxımee
Maxımee - avatar
+ 6
Hi Maximee not sure which api you are referring to but I checked one of my codes and my device motion is still working so hope the info helps.
16th May 2018, 12:55 PM
bobbie
bobbie - avatar
+ 6
Maximee your code appears to be working for me the arrow is moving and the numbers are changing. Did you drop your phone by chance? It may be your device I wonder?
16th May 2018, 1:37 PM
bobbie
bobbie - avatar
+ 5
the devicemotion and 'deviceorientation listeners still work on all of my codes
16th May 2018, 12:56 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
crazy :/ for me it doesn't work
16th May 2018, 1:06 PM
Maxımee
Maxımee - avatar
+ 5
Maximee if you want to post your code here we can try to help figure out why it's not working for you.
16th May 2018, 1:31 PM
bobbie
bobbie - avatar
+ 5
16th May 2018, 7:15 PM
seamiki
seamiki - avatar
+ 4
https://www.alsacreations.com/xmedia/doc/original/device-orientation-z.jpg
16th May 2018, 5:47 PM
Maxımee
Maxımee - avatar
+ 1
if i may ask guys,what is acclerationIncludingGravity.z? i know of x and y but z just seems to producing random values
16th May 2018, 2:51 PM
᠌᠌Code X
᠌᠌Code X - avatar