Beispiel #1
0
        private async Task TakeSinglePhoto()
        {
            AdbController controller = GetController();

            if (_lastCameraAction + Settings.Default.CameraOpenTimeout < DateTime.UtcNow ||
                !await controller.IsInteractiveAndUnlocked())
            {
                await OpenCameraSafely();

                await Task.Delay(1000);
            }

            await controller.TakeSinglePhotoAsync();

            UpdateLastCameraAction();
        }
Beispiel #2
0
        private async void OnTakeSinglePhotoButtonClickedAsync(object sender, EventArgs e)
        {
            AdbController controller = GetController();

            if (_lastCameraAction + Settings.Default.CameraOpenTimeout < DateTime.UtcNow ||
                !await controller.IsInteractiveAndUnlocked())
            {
                await OpenCameraSafely();

                await Task.Delay(1000);
            }

            await controller.TakeSinglePhotoAsync();

            UpdateLastCameraAction();
        }