Android AudioRecord fails to initialize

前端 未结 2 459
天涯浪人
天涯浪人 2021-01-21 22:31

I\'ve been having an issue with using AudioRecord for Android. I\'ve read as much as I can find online about it, but I cannot seem to get a good initialization. I have tried the

相关标签:
2条回答
  • 2021-01-21 23:06

    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.

    0 讨论(0)
  • 2021-01-21 23:18

    --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.

    0 讨论(0)
提交回复
热议问题