Only take one picture

This commit is contained in:
Joren 2024-05-02 10:30:59 +02:00
parent 1418145c69
commit e6a96f97fa
Signed by untrusted user who does not match committer: Joren
GPG Key ID: 280E33DFBC0F1B55
2 changed files with 8 additions and 24 deletions

View File

@ -15,28 +15,7 @@
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-05-01T21:00:11.388367735Z" />
<multipleDevicesSelectedInDropDown value="true" />
<runningDeviceTargetsSelectedWithDialog>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="RF8M8154RCX" />
</Key>
</deviceKey>
</Target>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Pixel_3a_API_34_extension_level_7_x86_64.avd" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetsSelectedWithDialog>
<timeTargetWasSelectedWithDropDown value="2024-05-02T08:29:59.116229999Z" />
<targetsSelectedWithDialog>
<Target>
<type value="QUICK_BOOT_TARGET" />

View File

@ -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()
}