List of usage examples for android.os Vibrator vibrate
@RequiresPermission(android.Manifest.permission.VIBRATE) public void vibrate(VibrationEffect vibe, AudioAttributes attributes)
From source file:com.sentaroh.android.SMBSync.SMBSyncMain.java
private void vibrateDefaultPattern() { Thread th = new Thread() { @Override/*from w w w. j a va 2s . c om*/ public void run() { Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(new long[] { 0, 200, 400, 200, 400, 200 }, -1); } }; th.start(); }