I am working on Android application in which I am taking picture from camera. I just want to set my camera orientation to be portrait. My code is given below from where I am sending request to OnActivityResult
:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
ContentValues values = new ContentValues(3);
values.put(MediaStore.Images.Media.DISPLAY_NAME, "testing");
values.put(MediaStore.Images.Media.DESCRIPTION, "this is description");
values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
imageFilePath = UserInfoActivity.this.getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
startActivityForResult(intent, 0);
Add these lines in your code
Add these lines in your Manifest.XML