I'm trying to disable system sound effects when a user clicks on a tab in my TabHost and to set my own custom sound. So I tried this to disable the system sound effect:
TabHost tabHost = getTabHost();
tabHost.setSoundEffectsEnabled(false);
And this is my code to play my custom sound:
tabHost.setOnTabChangedListener(new OnTabChangeListener() {
public void onTabChanged(String tabId) {
SoundUtility.getInstance(MainActivity.this).playPositive();
}
});
My custom sound does play, but also the system sound effect, it's not being disabled. So I actually have 2 sounds overlapping each other. So how do I disable the system sound effect?