想从应用程序捕获音频发射默认录音 [英] Want to launch default Voice recorder from application to capture audio
本文介绍了想从应用程序捕获音频发射默认录音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何启动默认的语音记录器,可以在设备录制的声音?我想这样做,使用 startActivityForResult
,以便捕获语音数据我能回到我的活动(类似于当我们启动摄像头捕捉的图像)。我不知道的意图动作来执行该
我怎样才能做到这一点。任何想法?
解决方案
我觉得<一个href="http://developer.android.com/reference/android/provider/MediaStore.Audio.Media.html#RECORD_SOUND_ACTION"相对=nofollow> RECORD_SOUND_ACTION 是你要寻找的。 P>
例如:
意向意图=新的意图(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(意向,ACTIVITY_RECORD_SOUND);
How can I launch default voice recorder available in device to record voice? I want to do that using startActivityForResult
so that captured voice data I can get back in my activity (similar to when we launch camera to capture image). I don't know the intent action to perform this.
How can I do this. Any ideas?
解决方案
I think RECORD_SOUND_ACTION is what you're looking for.
Example:
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, ACTIVITY_RECORD_SOUND);
这篇关于想从应用程序捕获音频发射默认录音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文