Java tutorial
//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); } public static void vibrar(Context context, long tempo) { ((Vibrator) context.getSystemService(context.VIBRATOR_SERVICE)).vibrate(tempo); } }