Reputation:
Is is possible to play the keyboard default sound without knowing the Android Version or the path to the sound.
The sound seems to change depending on the version of Android being used.
Upvotes: 1
Views: 325
Reputation: 35661
private void PlayKeyPress (Context c){
AudioManager am=(AudioManager) c.getSystemService(Context.AUDIO_SERVICE);
am.playSoundEffect(AudioManager.FX_KEYPRESS_STANDARD, (float) 0.5);
}
Upvotes: 3