i want to create a class in Android Studio using Kotlin that runs Camera in background
class MyForegroundService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
val notification = createNotification()
startForeground(1, notification)
// **************** I want to add camerax here *****************************
return START_STICKY
}
}
to run the camera in background can you help me please