My setup: Android 4.4 tablet connected with Sony bluetooth speakers. Spotify is playing music on the bluetooth speaker.
Using
audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audio.setStreamVolume(AudioManager.STREAM_NOTIFICATION, audio.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION), 0);
soundPool = new SoundPool(20, AudioManager.STREAM_NOTIFICATION, 0);
SoundBeeps = soundPool.load(this,R.raw.beeps,1);
soundPool.play(SoundBeeps, 1, 1, 0, 0, 1);`
the notification sound is played back on both the internal and the bluetooth speaker.
Is it possible to play a notification sound only on the tablet's internal speaker, not on the bluetooth speaker?