I am planning on developing my specific voip app for android.
Here's the scenario: when a phone call occurs I want to hear the person who's calling on my local pc speakers and I want to speak to him via my own pc microphone / headset. So I need to send the audio stream of both me and the person I am talking to via the wlan network.
Something like this:
...
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 it should be since voip apps are available in the market) I did some research in the Android API and all I found was the AudioManager which has constant named
public static final int STREAM_VOICE_CALL; //The audio stream for phone calls
But I don't know how to use it our how it should give me access to the actual audiostreams which I can send via network. How do I manage to do this?
The connection would be realised by TCP sockets.