無限期振動

使用振動(long []模式,int 重複)

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

// Start time delay 
// Vibrate for 500 milliseconds 
// Sleep for 1000 milliseconds 
long[] pattern = {0, 500, 1000};

// 0 meaning is repeat indefinitely 
vibrator.vibrate(pattern, 0);