service_sendaudio (java line: 682)
java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.
at android.media.AudioRecord.startRecording(AudioRecord.java:895)
at anywheresoftware.b4a.audio.AudioStreamer.StartRecording(AudioStreamer.java:98)
at app.test.recorder.service._sendaudio(service.java:682)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1058)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1005)
at app.test.recorder.main2._button1_click(main2.java:1117)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5264)
at android.view.View$PerformClick.run(View.java:21297)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5621)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
main2_button1_click (java line: 1117)
java.lang.RuntimeException: java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:223)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1058)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1005)
at app.test.recorder.main2._button1_click(main2.java:1117)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5264)
at android.view.View$PerformClick.run(View.java:21297)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5621)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
Caused by: java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.
at android.media.AudioRecord.startRecording(AudioRecord.java:895)
at anywheresoftware.b4a.audio.AudioStreamer.StartRecording(AudioStreamer.java:98)
at app.test.recorder.service._sendaudio(service.java:682)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
... 17 more
java.lang.RuntimeException: java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.
@Erel i have searched on forum and see similar problems as you suggested to other thread to use runtimepremission i have solve it following this tutorial
but what is the different if i add the permission in the manifest ? why i have to call the recording permission manually not while installation process
The 'record audio' permission is considered a dangerous permission. As explained in the tutorial you must explicitly request the user permission for this.