My app is using image from phone camera or from image gallery. The issue is when picture from gallery/library is taken with front facing camera, because it would have diferent orientation than back camera. Is there any way to get info on which camera was used for thaking the image (was if front or back)? I can get orientatin of image, but no origin of image (aka front or back camera).
For example, this is how I open native camera app:
Intent camera_intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
// Get file location.
imagePath ip = new imagePath();
File file = ip.getFile();
// Put extra arguments into activity.
camera_intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
// Start activity.
startActivityForResult(camera_intent, CAM_REQUEST);
And in onActivityResult I have this code:
protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) {
switch(requestCode) {
case CAM_REQUEST:
// Check result.
if (resultCode != 0){
readBitmapInfo(); // Here I get image from stored location.
}
}
}
Any sugestion?