Reputation: 33
So I've been working on a native WebRTC Android app which has to run on a device with Android 4.4. It seems however, that I cannot get any audio to play on the device. When I try the same app on a Nexus 6p (8.1) and Nexus 9 (7.0) the audio goes through just fine.
Also, the audio works when using the AppRTC demo app, but just using their loose WebRTC libraries does not seem to do the trick. I'm guessing they've done some magic in their AppRTCAudioManager but I can't figure out what.
Has anyone had and solved this problem when running WebRTC on a device an Android version lower than 5.0?
(I'm using the org.webrtc:google-webrtc:1.0.19742 library)
Two of the errors I spot in logcat:
Could not find class 'android.media.AudioAttributes$Builder', referenced from method org.webrtc.voiceengine.WebRtcAudioTrack.createAudioTrackOnLollipopOrHigher
Could not find class 'android.media.AudioRecord$Builder', referenced from method org.webrtc.voiceengine.WebRtcAudioRecord.createAudioRecordOnMarshmallowOrHigher
Upvotes: 1
Views: 438
Reputation: 33
After 9+ hours of research I present to you:
audioManager.setSpeakerphoneOn(true);
Make sure your audio device is set properly I suppose...
Upvotes: 2