Only take one picture
This commit is contained in:
		
							
								
								
									
										23
									
								
								.idea/deploymentTargetDropDown.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										23
									
								
								.idea/deploymentTargetDropDown.xml
									
									
									
										generated
									
									
									
								
							@@ -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" />
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user