I’m developing a sort of alarm clock application and I need to play my sound specifically through the phone audio and not through Bluetooth. (I learned this the hard way as I missed all three of my set alarms this morning because the alarms played through my Bluetooth headset)
How can I play a sound that only plays through phone audio and not Bluetooth?
I had similar requirement when user select an option, i need to play audio from speaker. so i changed audio stream type to ring like mp.setAudioStreamType(AudioManager.STREAM_RING) and it worked. Hope this works for you too. (NOTE: some phones have limitation that audio is played from both speaker and bluetooth)