New course! Every coder should learn Generative AI!
Try a free lesson+ 3
You should check the tags you use, as well as the description of your question.
In any case, the only way I think something like this is possible is using the API that Android provides for it.
https://developer.android.com/reference/android/os/Vibrator
https://stackoverflow.com/questions/13950338/how-to-make-an-android-device-vibrate
+ 1
If you mean Javascript, then yes, you can do it.
https://www.sololearn.com/learn/888/?ref=app