To vibrate Android device in the Unity, you need only one line of code.


which is,


Handheld.Vibrate();


that's All.



IF you develop the multi-platform app, Add pre-processor command to avoid the compilation error.


#if UNITY_ANDROID

Handheld.Vibrate();

#endif


Enjoy your job.