Vibrate for one time

suggest change

Use Vibrator.vibrate(long). The app needs android.permission.VIBRATE. This method is deprecated at API 26 in favor of VibrationEffect.

Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(500);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents