Here you can find the source of vibrar(Context context)
public static void vibrar(Context context)
//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);//from w w w .ja v a2 s. c o m } public static void vibrar(Context context, long tempo) { ((Vibrator) context.getSystemService(context.VIBRATOR_SERVICE)) .vibrate(tempo); } }