final Vibrator v = (Vibrator) MainActivity.getInstance().getSystemService(Context.VIBRATOR_SERVICE);
new Thread(new Runnable() {
@Override
public void run() {
while(true) {
v.vibrate(100);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();