HBiSoft / HBRecorder

Lightweight screen recording Android library
MIT License
402 stars 137 forks source link

Have error code = 100 #156

Closed mbermeleev closed 6 months ago

mbermeleev commented 7 months ago

Please help! This library has been imported into the project. It seems that everything has been done according to the instructions so that everything works, but an error crashes on android 14 immediately after clicking the "start" button, it gives an error code = 100 the following is indicated in the logs: E/HBRecorderOnError: java.lang.IllegalStateException: Must register a callback before starting capture, to manage resources in response to MediaProjection states. at android.media.projection.MediaProjection.createVirtualDisplay(MediaProjection.java:214) at com.hbisoft.hbrecorder.ScreenRecordService.initVirtualDisplay(ScreenRecordService.java:563) at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:273) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268) at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8893) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) E/HBRecorder: HBRecorderOnStart called At the same time, on android devices 13 and below, everything works correctly It problem actual for samsung's devices with android 14 I also installed your latest release on the device, it works correctly on the device

HBiSoft commented 6 months ago

This should be fixed in 3.0.2.