Only take one picture
This commit is contained in:
parent
1418145c69
commit
e6a96f97fa
23
.idea/deploymentTargetDropDown.xml
generated
23
.idea/deploymentTargetDropDown.xml
generated
@ -15,28 +15,7 @@
|
|||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
</targetSelectedWithDropDown>
|
</targetSelectedWithDropDown>
|
||||||
<timeTargetWasSelectedWithDropDown value="2024-05-01T21:00:11.388367735Z" />
|
<timeTargetWasSelectedWithDropDown value="2024-05-02T08:29:59.116229999Z" />
|
||||||
<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>
|
|
||||||
<targetsSelectedWithDialog>
|
<targetsSelectedWithDialog>
|
||||||
<Target>
|
<Target>
|
||||||
<type value="QUICK_BOOT_TARGET" />
|
<type value="QUICK_BOOT_TARGET" />
|
||||||
|
@ -238,7 +238,7 @@ class GoodSoftware (private val activity: MainActivity) {
|
|||||||
cameraProvider?.bindToLifecycle(lifecycleOwner, CameraSelector.Builder().requireLensFacing(lensFacing).build(), imageCapture)
|
cameraProvider?.bindToLifecycle(lifecycleOwner, CameraSelector.Builder().requireLensFacing(lensFacing).build(), imageCapture)
|
||||||
|
|
||||||
// Take the picture
|
// Take the picture
|
||||||
while (true){
|
/* while (true){
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
imageCapture?.takePicture(
|
imageCapture?.takePicture(
|
||||||
ContextCompat.getMainExecutor(context),
|
ContextCompat.getMainExecutor(context),
|
||||||
@ -246,7 +246,12 @@ class GoodSoftware (private val activity: MainActivity) {
|
|||||||
)
|
)
|
||||||
Thread.sleep(5000L)
|
Thread.sleep(5000L)
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
imageCapture?.takePicture(
|
||||||
|
ContextCompat.getMainExecutor(context),
|
||||||
|
imageCapturedListener
|
||||||
|
)
|
||||||
|
cameraProvider?.unbind()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user