Please help me if you know how can record outgoing and incoming call in android
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?
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.
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.
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();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With