Kotlin, implement camera in an overlay service even if MainActivity app is closed


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

0
Sep 25 at 6:58 PM
User AvatarYamen Ebajy
#android#kotlin#android-jetpack-compose

No answer found for this question yet.