Vibration patterns, Android OpenSesame
in OpenSesame
Hello,
is there a way to induce specific vibration patterns on the phone for an experiment running on Android with OpenSesame?
Thank you in advance
Comments
Hi @bbkm ,
Just to clarify: the OpenSesame runtime for Android is no longer maintained, and only still works on very old devices. So don't use that!
You can, however, run OSWeb experiments in Android through the browser. And then you can use the
window.navigator.vibrate()function to make supported devices vibrate. This will be silently ignored on the devices that don't vibrate or browsers that don't support this though!The following code, which you can put in an
inline_javascriptitem, will make a device vibrate for 300 ms, be silent for 100 ms, then vibrate for 200 ms, be silent for 50 ms, and finally vibrate for another 300 ms.Hope this is useful!
-- Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hello @sebastiaan
that was very helpful ! Thank you very much for that!