Skip to content

Commit

Permalink
Merge pull request #57 from arsun2/newPhilip
Browse files Browse the repository at this point in the history
vib 100 ms
  • Loading branch information
arsun2 committed Apr 30, 2019
2 parents b511c51 + 19fcdc6 commit d2f2546
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ public void switchQuarterHelper(boolean nextGame){
private void vibrateHelper(){
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
System.out.print("vibrated\n");
// Vibrate for 500 milliseconds
// Vibrate for 100 milliseconds
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
v.vibrate(VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE));
} else {
//deprecated in API 26
v.vibrate(500);
v.vibrate(100);
}
}
}

0 comments on commit d2f2546

Please sign in to comment.