Please elaborate how to use ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION for screen recorder
I just want to make a screen recorder for API level 30 and above but IDE is throwing Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION error.
Please provide a solution to overcome this problem, because I don't want to use any dependency to build the screen recorder.
Thank you!
Have a look at the read me. Specifically point 4 in Implementing the library
You need the following in your Manifest:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
I don't want to use implementation 'com.github.HBiSoft:HBRecorder:0.1.15' I just want to develop a screen recorder without any third party library, your library is working fantastic but this is not what I want to do, I am using android's native functions and APIs to develope the screen recorder. ie: MediaProjection, MediaRecorder, VirtualDisplay.
I hope you got my point. Thanks.
I'm not sure what you want from me.
This is a library and only issues related to the library should be opened.
If you what to know how to use/implement MediaProjection , MediaRecorder and VirtualDisplay you are more than welcome to have a look how I did it in the library.