谁能给$ C $下录音笔作为android手机的应用程序? [英] Can anyone give code for voice recorder as an application on android phone?

查看:157
本文介绍了谁能给$ C $下录音笔作为android手机的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要开发的android手机就录音笔的应用程序。我要录制声音约30秒,然后停止并保存录制的声音在画廊。任何人都可以张贴code,如果你有吗?

I want to develop an application on android phone regarding voice recorder. I have to record a sound for about 30 seconds and then stop and save the recorded sound in gallery. Can anyone post the code if you have please?

推荐答案

还有就是的如何在Android开发者文档使用 MediaRecorder 做音频捕捉的例子。

There is an example of how to do audio capture using MediaRecorder in the Android Developer Documentation.

我会建议节省SD卡中的文件,然后让您的画廊code。检查SD卡,看看哪些文件显示。您可以使用获得SD卡的目录中的<一个href="http://developer.android.com/intl/de/reference/android/os/Environment.html#getExternalStorageDirectory%28%29"><$c$c>Environment.getExternalStorageDirectory()法。这将是最好的保存在SD卡根目录下的子目录文件。

I would recommend saving the files on the SD Card and then have your gallery code check the SD card to see which files to display. You can get the directory of the SD Card using the Environment.getExternalStorageDirectory() method. It would be best to save your files in a subdirectory of the SD Card root directory.

请确保您给你的应用程序的权限就需要 。至少,这将需要<一个href="http://developer.android.com/intl/de/reference/android/Manifest.permission.html#RECORD_AUDIO"><$c$c>RECORD_AUDIO和<一href="http://developer.android.com/intl/de/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE"><$c$c>WRITE_EXTERNAL_STORAGE.

Make sure you give your applications the Permissions it will need. At the very least it will need RECORD_AUDIO and WRITE_EXTERNAL_STORAGE.

这篇关于谁能给$ C $下录音笔作为android手机的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆