i have integrated livekit meet sdk in a react native app and build the ui and screenshare. now the problem is when i screenshare and use native back button the livestream ends. what i want is it should not end the session on back button it should still screenshare while in the app untill i manually kill the app itself. but i could not find a way to do that, help me with code snippets and explaination
Meet as in GitHub - livekit-examples/meet: Open source video conferencing app built on LiveKit Components, LiveKit Cloud, and Next.js. · GitHub ? That’s a sample app rather than an SDK and it’s not designed to screenshare on mobile whilst in the background.
At the very least you would have platform-specific permissions to deal with, for example on Android your app would need to request foreground service permission of type media projection (and probably others).
Trying to find a code example for this, I didn’t think we had any but I did come across this for native Android: client-sdk-android/livekit-android-sdk/src/main/java/io/livekit/android/audio/ScreenAudioCapturer.kt at main · livekit/client-sdk-android · GitHub (I know you were looking for React Native, but it at least shows the principle)