When you integrate the Android sample app for Streaming(Millicast) in your application, you may notice that when you subscribe to the stream and try to play it via the viewer app - the audio is streamed from the earpiece speaker, resulting in very low audio levels.
Currently, the Android sample app for Streaming, streams the audio from the earpiece speaker by default and not from the device speaker. If you want to enable the audio to the device speaker, then you can do this by the code changes outlined in the solution section below. This solution can be customized as per your app requirement, using a UI component to switch to the available speakers.
You need to update setAudioMode in the sample app code with the following changes:
Then add the following Android permission for audio settings to make it work.
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
The sample application will add the option to set the default external speaker.
Dolby.io Streaming Android SDK sample app