Here you can find the source of vibrar(Context context, long tempo)
public static void vibrar(Context context, long tempo)
//package com.java2s; import android.content.Context; import android.os.Vibrator; public class Main { public static void vibrar(Context context) { ((Vibrator) context.getSystemService(context.VIBRATOR_SERVICE)) .vibrate(200);/* ww w .j av a 2 s. com*/ } public static void vibrar(Context context, long tempo) { ((Vibrator) context.getSystemService(context.VIBRATOR_SERVICE)) .vibrate(tempo); } }