+ 17
'Vibrate' method error
Hi guys! The codes that use vibration throw: "Uncaught TypeError: Object #<Navigator>Â has no method 'vibrate' Line 19" So I developed a code that helps me check: 1) If my browser supports vibration. 2) Test buttons with vibration method. If I run it on this app it says: (1)Â this browser doesn't support vibration and (2) the test buttons throw the error message. But if I run it on Chrome it works fine. Is there a way to make it work on the webview? Thanks đ https://code.sololearn.com/Wwlu7YrHh0NS/?ref=app
7 Answers
+ 8
đ i dont know.. but it works on my phone with no errors in the app
+ 7
@jay, @Very_Hard and @Lord_Krishna: Thank you guys for your valuable feedback and testing đđ
+ 6
New wrinkle:
https://code.sololearn.com/WNcw9wVoFc41/?ref=app
+ 4
In this webview work fine
And also unprefixed
+ 4
the vibration works in app using the newest web view 59. this works in Firefox.
tried this in Firefox focus (uses web view for rendering) says vibration is supported but did not vibrate nor shows any error
+ 4
Thanks for saying something + developing a cover case to link.
One of my devices has no vibration module at all... and never throws an error. I don't bother checking for exactly that reason...and (having never been told) it means I've suggested it to people without noting they should check.
This is a nice solution to that.
0
simple example
https://code.sololearn.com/WAk0zRTVq9BB/?ref=app