I need the camera to display in a specific area of ββthe screen in Android, here is the code that I use for the cameraβs activity
Now the camera works, but it occupies the entire screen. I want the camera to appear in part of the screen screen, how to do it.
private void uploadPhoto(String name) { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); File file = new File(Environment.getExternalStorageDirectory(), name + ".jpg"); mImageCaptureUri = Uri.fromFile(file); try { intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intent.putExtra("return-data", true); startActivityForResult(intent, PICK_FROM_CAMERA); } catch (Exception e) { e.printStackTrace(); } }
source share