Thanks Erel for pointing out about AudioRecord library for capturing the audio from microphone and network for sending it through SOCKET . but actually i found out that not using a combination of RandomAccessFile lib and Socket Library to send tcp packet through write and receiving that packet through an event that it fires , i found one of the project that ties Ayncstreams to Socket Library and AudioRecord.
The only problem around is that AudioRecord Function itself from android only Supports pcm 8 and 16 bit which produces audio data too large requires 11400 bit/ sec bandwidth , only for CD Quality Not Network I mean 3g Cellular or even wifi network my interest is in 3g network. all the code i found on the net that uses Audiotrack ( Android java programmers) they use Jspeex Codec library which requires 4.5 bit/sec Unfortunate jSpeek is not available as library in te b4a library .
the other Option is to use android Media recorder function , it offers as an option AMR Codec . b ut its problem you can not save the audio byte in buffer and then use SOCKT to send it through , you can only tie the socket instance directly to it and use socket send . you or we can play with it to send text and audio bytes at the same time.
the strange thing that after more than a year i have familiar with some android commands but i was never able to get familiar with android java itself , the truth is that android java is so complicated to learn that is for me may be its easier for others, i got frustrated , then i shifted to windows mobile for this project . but now i believe i put my effort back to Android thanks to your efforts for making BASIC4ANDROID , it really helps. i think alot of people who give up android programming because of java might head back to it using B4A.
Abdulla