Closed jeff-hykin closed 6 years ago
i love it
This is great, thanks! I'll roll these changes out and see if I get any crashes, but for now it looks good
Keyboard was crashing since we keep creating MediaPlayers but never release the memory. Fixed using this answer (https://stackoverflow.com/a/16097234)
I have experience programming in general but non specific to Android development. I'm not certain these changes are bulletproof, But I wanted to make progress on adding keypress sound rather than just asking for the feature. I created the check box for keypress sound in settings, and by default sound is on. This is because I used the vibration setting as a template.
In the event that the code doesn't work, or is slow, or the sound plays continuously in a loop, I'd greatly appreciate help in getting it working properly. I'm not quite sure how to package everything up into one apk.
The keypress sound is the default android sound "Effect_Tick.ogg", and its the same sound for backspace, spacebar, regular keys which is not optimal, but it shouldn't be difficult to change after the sound itself is working. I didn't specifically make the sound call asynchronous, so pressing keys rapidly will probably cut off the sound from the previous key.