Search code examples
androidandroid-keypad

How to turn off button clicks in Android programmatically


I am writing a program that records audio while the user is typing.

I am finding that the audio playback includes the tapping sound of the keyboard.

Is there any way to (a) determine if the the keyboard click feedback sound is set, (b) if so turn it off, and (c) turn it back on again (if it was on to begin with) when the person exits the program


Solution

  • The keyboard sounds and also other sounds effects can be control with AudioManager. Please refer to android documentation: 'Keyboard and direction pad click sound' http://developer.android.com/reference/android/media/AudioManager.html#FX_KEY_CLICK