HBiSoft / HBRecorder

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

Android 14 Error Code 100 #157

Closed StefanLFS closed 6 months ago

StefanLFS commented 7 months ago

Receving the below error code on Android 14 Devices

Foreground services has been declared in the manifest.

error code = 100 E/HBRecorderOnError: java.lang.IllegalStateException: Must register a callback before starting capture, to manage resources in response to MediaProjection states

Hamzakhann commented 7 months ago

I am also getting same error

kalgik commented 6 months ago

The problem is in the MediaProjection. Here are the steps I did and it worked for me:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"/>

StefanLFS commented 6 months ago

Thank you.

Yes I did exactly like the above steps, and its working now.

HBiSoft commented 6 months ago

This should be fixed in 3.0.2. Thank you for all the contributions and apologies for the delay.