AsynctaskCoffee / VoiceRecorder

Easy Android Audio Voice Recorder for lazy coders ;) (WRAPPER)
Apache License 2.0
41 stars 8 forks source link

java.lang.IllegalStateException #2

Closed bilawwad closed 3 years ago

bilawwad commented 3 years ago

Hello, Im getting this error when not holding the record button. is there any way to avoid this from happening? thanks

java.lang.IllegalStateException at android.media.MediaRecorder._start(Native Method) at android.media.MediaRecorder.start(MediaRecorder.java:1313) at com.asynctaskcoffee.audiorecorder.worker.Recorder.startRecord(Recorder.kt:40) at com.asynctaskcoffee.audiorecorder.uikit.VoiceSenderDialog$1.run(VoiceSenderDialog.java:184) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

AsynctaskCoffee commented 3 years ago

It happens when you send multiple record event at the same time. It could be bug I will check and fix it asap in couple days. I will let you know on next release. Thank you for feedback.

bilawwad commented 3 years ago

It happens when you send multiple record event at the same time. It could be bug I will check and fix it asap in couple days. I will let you know on next release. Thank you for feedback.

Thank you very much, will be waiting for the update.

here are some more details in case it helps.

This is happening with the (bottom sheet modal) if record button is pressed but not hold an exception occur ( but this exception is handled from the lib so it doesn't crash) and the bottom sheet is auto dismissed after, and if we try to record again then the above crash occurs.

AsynctaskCoffee commented 3 years ago

Will you please try
implementation 'com.github.AsynctaskCoffee:VoiceRecorder:beta-0.4'

AsynctaskCoffee commented 3 years ago

I did not try but It should work. Please let me know it worked or not 🦖

bilawwad commented 3 years ago

I did not try but It should work. Please let me know it worked or not 🦖

It works now, thank you very much for your time. hope you have an amazing day :)