Намерение открыть камеру по умолчанию в квадратном режиме - PullRequest
0 голосов
/ 13 мая 2019

Я могу открыть камеру по назначению следующим образом:

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

                // Ensure that there's a camera activity to handle the intent
                if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
                    // Create the File where the photo should go
                    File photoFile = null;
                    try {
                        photoFile = Utility.createImageFile(BotActivity.this);
                    } catch (IOException ex) {
                        // Error occurred while creating the File

                    }
                    // Continue only if the File was successfully created
                    if (photoFile != null) {
                        Uri photoURI = FileProvider.getUriForFile(BotActivity.this,
                                "com.kutumbita.app.fileprovider",
                                photoFile);

                        takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
                        startActivityForResult(takePictureIntent, CAMERA_CAPTURE_REQUEST);
                    }
                }

Есть ли способ запустить камеру с квадратным размером?

1 Ответ

0 голосов
/ 16 мая 2019

Я пришел к решению, что это невозможно с родным Android SDK.Спасибо

...