Error: could not register audio policy
After allowing to record the sndcpy apk crashes and nothing happens, Any Solution? Im using custom rom
adb logcat
?
Im using Galaxy Note 8 and there is no official Android 10 provided by samsung but Im using Unofficial Aosp android 10.
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.rom1v.sndcpy, PID: 1892
E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.rom1v.sndcpy.RecordService@957c3fc with Intent { act=com.rom1v.sndcpy.RECORD cmp=com.rom1v.sndcpy/.RecordService (has extras) }: java.lang.UnsupportedOperationException: Error: could not register audio policy
E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4105)
E AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:219)
E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7355)
E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Error: could not register audio policy
E AndroidRuntime: at android.media.AudioRecord$Builder.buildAudioPlaybackCaptureRecord(AudioRecord.java:661)
E AndroidRuntime: at android.media.AudioRecord$Builder.build(AudioRecord.java:681)
E AndroidRuntime: at com.rom1v.sndcpy.RecordService.createAudioRecord(RecordService.java:155)
E AndroidRuntime: at com.rom1v.sndcpy.RecordService.startRecording(RecordService.java:159)
E AndroidRuntime: at com.rom1v.sndcpy.RecordService.onStartCommand(RecordService.java:86)
E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4087)
E AndroidRuntime: ... 8 more
Probably something related to "audio policy" to configure in the ROM.
Any Solution for it? Rom dev said you can setup scrcpy to forward audio and i don't know how to do that. :)
On Tue, Jun 16, 2020, 1:26 PM Romain Vimont [email protected] wrote:
E AndroidRuntime: FATAL EXCEPTION: main E AndroidRuntime: Process: com.rom1v.sndcpy, PID: 1892 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.rom1v.sndcpy.RecordService@957c3fc with Intent { act=com.rom1v.sndcpy.RECORD cmp=com.rom1v.sndcpy/.RecordService (has extras) }: java.lang.UnsupportedOperationException: Error: could not register audio policy E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4105) E AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:219) E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107) E AndroidRuntime: at android.os.Looper.loop(Looper.java:214) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7355) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Error: could not register audio policy E AndroidRuntime: at android.media.AudioRecord$Builder.buildAudioPlaybackCaptureRecord(AudioRecord.java:661) E AndroidRuntime: at android.media.AudioRecord$Builder.build(AudioRecord.java:681) E AndroidRuntime: at com.rom1v.sndcpy.RecordService.createAudioRecord(RecordService.java:155) E AndroidRuntime: at com.rom1v.sndcpy.RecordService.startRecording(RecordService.java:159) E AndroidRuntime: at com.rom1v.sndcpy.RecordService.onStartCommand(RecordService.java:86) E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4087) E AndroidRuntime: ... 8 more
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rom1v/sndcpy/issues/4#issuecomment-644592003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6VANIVK7UYZHOGZQGLBELRW4OZTANCNFSM4N5Y6KYQ .
Any Solution for it? i met this error today,i dont understand why i am wrong