Record video/audio in the background

Hey there! I’m looking for a solution to start recording video/audio through my app while the app is still in the foreground. So, the video/audio recording should happen in the background and stop whenever I press the stop button in my app. Is something like this even possible?

If this is possible as PIP even better. The important goal is to be able to record while still using the app.

Thank you!

Anyone, any ideas? Is something like this even possible?

I make it using Joyoshare’s best screen recorder for PC. You can choose to record in full screen or a partial screen. When it starts recording, anything that happens on your desktop will be saved in the output format you set. You can still run your apps freely. I think this tool can help you.