Android AudioRecord fails to initialize

空扰寡人 提交于 2019-12-01 23:26:21

--edit--

Please see Bill's answer.

--end edit--

Maybe you should check whether you acquired the correct permission. e.g. you need to get android.permission.VIBRATE in your AndroidManifest.xml file if you need to vibrate the device.

I think he means you need the RECORD_AUDIO permission in the manifest:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

That worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!