Vibrate for one time
suggest changeUse 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);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents