Skip to content

Instantly share code, notes, and snippets.

@nieldeokar
Created November 13, 2017 11:18
Show Gist options
  • Save nieldeokar/8f0eaff1a8906a6bf318bf03e82077cd to your computer and use it in GitHub Desktop.
Save nieldeokar/8f0eaff1a8906a6bf318bf03e82077cd to your computer and use it in GitHub Desktop.
Using Vibrate in android demo snippet
<uses-permission android:name="android.permission.VIBRATE"/>
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
if (vibrator.hasVibrator()) {
vibrator.vibrate(500); // for 500 ms
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment