tr00don
Lurker
Hi all, I’m new to Android and I would greatly appreciate some input on the following audio-related questions:
1. Is there anything that I need to do for my app to send audio to the wired headphones or external speaker when connected, instead of the internal speaker? My app uses AudioTrack.Play to play a beep. It always plays through the built-in speaker, even when I plug in headphones, wired or wireless. I think some additional control is possible through the Usage and ContentType fields but it's not clear to me how.
2. Same question as above but specifically for the case when the smartphone is connected to a Bluetooth speaker.
3. Same questions as above but for audio input (i.e., do I need to programmaticaly read audio from a connected wired or wireless microphone or is the system supposed to switch to these external devices automatically when they are connected?)
I am aware of the requirement to request and obtain the Bluetooth permission in order to access such devices but I am confused because other apps do play audio to my Bluetooth speaker, apparently without requiring any Bluetooth permission. What am I missing here?
Any help is greatly appreciated.
1. Is there anything that I need to do for my app to send audio to the wired headphones or external speaker when connected, instead of the internal speaker? My app uses AudioTrack.Play to play a beep. It always plays through the built-in speaker, even when I plug in headphones, wired or wireless. I think some additional control is possible through the Usage and ContentType fields but it's not clear to me how.
2. Same question as above but specifically for the case when the smartphone is connected to a Bluetooth speaker.
3. Same questions as above but for audio input (i.e., do I need to programmaticaly read audio from a connected wired or wireless microphone or is the system supposed to switch to these external devices automatically when they are connected?)
I am aware of the requirement to request and obtain the Bluetooth permission in order to access such devices but I am confused because other apps do play audio to my Bluetooth speaker, apparently without requiring any Bluetooth permission. What am I missing here?
Any help is greatly appreciated.
Last edited: