Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I record voice and record Call in Android? [closed]

Please help me if you know how can record outgoing and incoming call in android

like image 808
PrashantAdesara Avatar asked Nov 16 '10 12:11

PrashantAdesara


People also ask

How do I turn on call recording when closing?

Enabling Call Recording To initiate Call Recording, open your Phone Settings and toggle on the Call Recording option. The first time you do this, you'll have to agree to some terms and conditions. Once you've enabled the option, any call you make will be recorded. Is Call Recording legal?

Can I record a conversation while talking on my Android phone?

On your Android device, open the Voice app and tap the menu, then settings. Under calls, turn on incoming call options. When you want to record a call using Google Voice, simply answer the call to your Google Voice number and tap 4 to start recording.

Can I voice record with my phone off?

Background RecorderBackground Recorder lets you record voice by long-pressing the volume down button on your phone- no need to open any app to start recording.


1 Answers

Yes It is possible just do this

final MediaRecorder callrecorder = new MediaRecorder(); callrecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); callrecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); callrecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);  callrecorder.setOutputFile(filepath);  try {     callrecorder.prepare(); } catch (IllegalStateException e) {     System.out.println("An IllegalStateException has occured in prepare!");     // TODO Auto-generated catch block     e.printStackTrace(); } catch (IOException e) {      //throwing I/O Exception     System.out.println("An IOException has occured in prepare!");     // TODO Auto-generated catch block     e.printStackTrace(); }  try {     callrecorder.start(); } catch(IllegalStateException e) {     e.printStackTrace();     //Here it is thorowing illegal State exception     System.out.println("An IllegalStateException has occured in start!"); } 

for stopping you can use

callrecoder.stop(); 
like image 114
Abhijit Chakra Avatar answered Sep 27 '22 22:09

Abhijit Chakra