android - Cant find the stored audio file in my internal storage -
am trying record audio , store audio in internal storage not sdcard. after following tutorials cant find recorded audio in device
public void record(){
new countdowntimer(5000, 1000) { // 5000 = 5 sec public void ontick(long millisuntilfinished) { startrecording(); toast.maketext(homeactivity.this, r.string.record_audio, toast.length_long).show(); } public void onfinish() { stoprecording(); toast.maketext(homeactivity.this, r.string.record_saved, toast.length_long).show(); } }.start(); }
public void startrecording() {
if(mrecorder!=null){ mrecorder.release(); } file fileout = new file(file); if(fileout!=null){ fileout.delete(); } mrecorder = new mediarecorder(); mrecorder.setaudiosource(mediarecorder.audiosource.mic); mrecorder.setoutputformat(mediarecorder.outputformat.three_gpp); mrecorder.setoutputfile(file); mrecorder.setaudioencoder(mediarecorder.audioencoder.amr_nb); try { mrecorder.prepare(); } catch (ioexception e) { e.printstacktrace(); } mrecorder.start(); }
Comments
Post a Comment