I am trying out the record outgoing call using mic written this code but not working, I tested the code for simple audio record it works fine, I am not sure when to start me
Call recording is not yet possible on Android. See this feature request.
You can record your voice from microphone, but you can not record the sound of the other party. If you only want to record your voice use android.media.MediaRecorder.AudioSource.MIC
You cannot record calls because the firmware doesn't support it . There is a better answer at xda-devs which I got from android's open issues list :
The voice streams were handled by the baseband processor baseband processor, it's that the baseband firmware aren't setup to offer the streams to the application processor that's limiting the ability to truly record a call. The Android system long has the API implemented, but it can do nothing in this case.
Since the baseband firmware is close sourced and available in binary only, I doubt if the brilliant hackers here can do anything about this.
someone found a "cure" for HD2 , just by editing the registry - xda-developers.com/windows-mobile/two-way-in-call-recording-on-hd2-fixed/wo-way-in-call-recording-on-hd2-fixed/