I'm working on custom keyboard and need to play tap sound for keys if it enabled in the Settings. Tap sound not a problem but how to check is keyboard click sound enabled ? Thanks.
There's no documented way to check this, but it's possible. I don't know if this really counts as "private API", so be prepared for rejection if you use this method.
The keyboard click sound settings is stored in the shared com.apple.preferences.sounds
preference. So you could try
return CFPreferencesGetAppBooleanValue(
CFSTR("keyboard"),
CFSTR("/var/mobile/Library/Preferences/com.apple.preferences.sounds"),
NULL);
(BTW: the actual call to play the "click" sound in UIKit is [UIHardware _playSystemSound:1104];
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With