The simple way to do the job is to use Haptic Feedback
Button fast1 = (Button) findViewById(R.id.fast1);
fast1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
}
});
The good part with this is you do not need to set a permission in the AndroidManifest. Please note you need enable Haptic Feedback as global. check it from http://developer.android.com/reference/android/view/HapticFeedbackConstants.html .
You can simply use following code to enable Haptic Feedback for your application.
Settings.System.putInt(getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, 1);
don't forget to add the following permission in AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_SETTINGS"></uses-permission>