I am getting this error when I try to record audio on my app. It was working fine but when I switched the target API to 29 as required by google to upload the app on the store I started getting this error. It looks like I am getting error when I try to access external storage. Is there any way to access internal storage? I dont see anything about this.
Here is the line of code:
Here is the Error I am getting:
{Java.Lang.RuntimeException: stop failed.
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <f1f8dcdb8c91400fb3213a928a387983>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <f1f8dcdb8c91400fb3213a928a387983>:0
at Android.Media.MediaRecorder.Stop () [0x00000] in /Users/builder/azdo/_work/278/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-28/mcw/Android.Media.MediaRecorder.cs:1934
at Droid.Services.AndroidSoundProvider.StopAudioRecording (System.Int32 userid) [0x000e2] in <bd60d41757dc4dff800b975fe52399da>:0
at Services.SoundService.StopAudioRecording (System.Int32 userid) [0x0002b] in \Services\SoundService.cs:25
at Pages.AudioRecord.BtnStopClicked (System.Object sender, System.EventArgs e) [0x00200] in \Pages\AudioRecord.xaml.cs:105
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.RuntimeException: stop failed.
at android.media.MediaRecorder.stop(Native Method)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)