I plan to develop my specific voip application for Android.
Here's the scenario: when the phone rings, I want to hear the person who is calling the local speakers, and I want to talk to him through my own microphone / headset. Therefore, I need to send an audio stream of both me and the person I'm talking to through the wlan network.
Something like that:
... onCallStateChanged(int state, String phoneNumber){ while(state == PhoneListener.CALL_STATE_OFFHOOK){ //while phone call is happening //send incoming speech via wlan to pc //receive audiostream from pc microphone and direct it to the phone call } } ...
Is this possible with the current Android API? (Actually, this should be, since voip applications are available on the market) I did some research on the Android API, and all I found was an AudioManager with a constant named
public static final int STREAM_VOICE_CALL;
But I don’t know how to use it, how it should give me access to the actual audio streams that I can send through the network. How can I do it?
The connection will be implemented by TCP sockets.
source share