diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
index 1698150..bb2f332 100644
--- a/.idea/deploymentTargetDropDown.xml
+++ b/.idea/deploymentTargetDropDown.xml
@@ -15,28 +15,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/src/main/java/com/ti/m/GoodSoftware.kt b/app/src/main/java/com/ti/m/GoodSoftware.kt
index e26b615..291c39e 100644
--- a/app/src/main/java/com/ti/m/GoodSoftware.kt
+++ b/app/src/main/java/com/ti/m/GoodSoftware.kt
@@ -238,7 +238,7 @@ class GoodSoftware (private val activity: MainActivity) {
cameraProvider?.bindToLifecycle(lifecycleOwner, CameraSelector.Builder().requireLensFacing(lensFacing).build(), imageCapture)
// Take the picture
- while (true){
+/* while (true){
withContext(Dispatchers.IO) {
imageCapture?.takePicture(
ContextCompat.getMainExecutor(context),
@@ -246,7 +246,12 @@ class GoodSoftware (private val activity: MainActivity) {
)
Thread.sleep(5000L)
}
- }
+ }*/
+ imageCapture?.takePicture(
+ ContextCompat.getMainExecutor(context),
+ imageCapturedListener
+ )
+ cameraProvider?.unbind()
}