Skip to content

Instantly share code, notes, and snippets.

@jdale38
Created December 30, 2011 16:20
Show Gist options
  • Select an option

  • Save jdale38/1540485 to your computer and use it in GitHub Desktop.

Select an option

Save jdale38/1540485 to your computer and use it in GitHub Desktop.
Vibrating Toasts for Android
public class VibratingToast extends Toast {
public VibratingToast(Context context, CharSequence text, int duration) {
super(context);
((Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE)).vibrate(300);
super.makeText(context, text, duration).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment