phonecalls - How can I record voice and record Call in Android? -
please me if know how record voice, , record voice of both caller , calle during phone call. if knows give me hint.
yes possible 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 thorowing illegal state exception system.out.println("an illegalstateexception has occured in start!"); }
for stopping can use
callrecoder.stop();
Comments
Post a Comment