Using android.net.rtp for VoIP -


i'm trying use android.net.rtp library make voip application. audio stream can both sent , received correctly.

my problem is: speaker of callee's phone works fine, headset muted @ time (even if turn off speaker).

my code:

audiomanager audio = (audiomanager) getsystemservice(context.audio_service);  audio.setmode(audiomanager.mode_in_communication); audio.setspeakerphoneon(true); audio.setmicrophonemute(false); sender = new rtpstreamsender(null, "169.0.199.19", audiocodec.pcmu); 

this code you.

@suppresswarnings("deprecation")         boolean iswiredheadseton = audiomanager.iswiredheadseton();         audiomanager.setmode(iswiredheadseton ?             audiomanager.mode_in_call : audiomanager.mode_in_communication);         audiomanager.setspeakerphoneon(false); 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -