I have a kotlin jetpack compose app that includes an overlay service, which displays a few buttons as a floating overlay
I want one of the buttons to access the phone camera (show preview, capture photo...)
I tried implementing it and it works only when the app of my service is also active in the foreground, but if I switch to another app, the overlay is still working but the camera no.
anyone knows a reliable way to implement a camera in my overlay service independently from the MainActivity app, so it works even when I switch to another app
thanks alot