import android.os.Vibrator;
...
Vibrator v = (Vibrator) this.context.getSystemService(Context.VIBRATOR_SERVICE);
// Vibrating for 500 milliseconds.
v.vibrate(500);
You can do it like this.
I went to the Android manifest file
<uses-permission android:name="android.permission.VIBRATE"/>
You need permission.
© 2024 OneMinuteCode. All rights reserved.