Questions tagged [android-exifinterface]
41 questions
6
votes
1 answer
Retrieving GPS EXIF data from images using AndroidX ExifInterface?
I'm targeting Android 13 and using the new photo picker to retrieve images. E.g.
val photoPicker = rememberLauncherForActivityResult(
contract = ActivityResultContracts.PickMultipleVisualMedia()
) { uris: List -> handleUris(context,…

Niels Masdorp
- 2,534
- 2
- 18
- 31
5
votes
2 answers
Android 11 get image orientation from EXIF
Hi I have an app with compileSdkVersion 30 and targetSdkVersion 30.
Since I need to know the orientation of image, I wrote these:
val exif = ExifInterface(imageFile.absolutePath)
val orientation = exif.getAttributeInt(
…

magic_mickey
- 61
- 3
3
votes
0 answers
Failed to extract location (lat,long) coordinates from image media using EXIF in Android
I am trying to extract location coordinates from image media in my Android app but ExifInterface providing a null value even though image media contains those details. I had tried on Android 9, 10, and 11 OS emulators and devices.
I am using…

Bipin Vayalu
- 3,025
- 2
- 25
- 39
3
votes
1 answer
ExifInterface GPS not read on Android Q/10
I'm having the issue that Android 10 can't read GPS information from my jpeg files. The exact same files are working on Android 9.
I tried the ExifInterface (androidx) which returns null, as well as apache commons imaging which is saying…

Denny Weinberg
- 2,492
- 1
- 21
- 34
3
votes
3 answers
Android ExifInterface not saving attribute
Below is my code-
try {
InputStream inputStream = getAssets().open("thumbnail.jpg");
exifInterface = new ExifInterface(inputStream);
exifInterface.setAttribute(ExifInterface.TAG_ARTIST,"TEST INPUT");
exifInterface.saveAttributes();
} catch…

user1122549
- 664
- 1
- 13
- 27
2
votes
0 answers
ExifInterface 1.3.3 returns "0/1 0/1" for longitude and latitude values
fun ExifInterface.getTags(): HashMap {
val mAttributes = mAttributes()
var map = HashMap()
if (mAttributes is Array<*>) {
val arrayOfMapAux = mAttributes as Array

roma972012
- 21
- 3
2
votes
0 answers
Android Camera Exif no orientation data but Image is rotated
I am using following helper class to handle sampling and rotation of the Camera Image.
object CaptureImageHelper {
/**
* This method is responsible for solving the rotation issue if exist. Also scale the images to
* 1024x1024 resolution
*
*…

Nouman Bhatti
- 1,777
- 4
- 28
- 55
2
votes
1 answer
Androidx Exifinterface crashes when try to saveAttributes. Write failed: EBADF (Bad file descriptor)
When trying to save any JPEG picture using saveAttributes() from androidx Exifinterface, my program crashes with the error "write failed: EBADF (Bad file descriptor)"
I can replicate the error starting fresh from a new project. I'm using Android…

Taba Buia
- 23
- 3
1
vote
0 answers
Shot image is displayed in the wrong orientation. It only works in the emulator
I have an understanding problem. I take a photo and then want to display it in the correct orientation. If I run through the whole thing on the emulator, everything works. Only on the right device, the picture in portrait mode is always displayed…

Captai-N
- 1,124
- 3
- 15
- 26
1
vote
0 answers
Android - Adding information to Image's EXIF
I want to add GPS information to an image. I created that image at a Uri returned by ContentResolver.Insert().
I found out that ExifInterface can be used to write the GPS information, but to use it I need the path to the image.
My question is - How…

Shubham Agarwal
- 95
- 6
1
vote
0 answers
Find TAGS for custom values in exif Android
Hello i am trying to write custom values in EXIF of my .jpg images but i can't find some of the TAG that would be equivalent to the following :
I have tried to find the TAGs here :…

Tom3652
- 2,540
- 3
- 19
- 45
1
vote
0 answers
Can I create image exif data just base on a Bitmap?
I want to save a Bitmap into a *.HEIC file. When I saved a heif file and reopen it by ImageDecoder, it report those errors. I think it may because image file does not have exif data. I check Exifinterface, but it does not have constructor from…

Aroc
- 11
- 3
1
vote
0 answers
Exception: Failed resolution of: Landroidx/exifinterface/media/ExifInterface;
First, I am aware of a similar question. My situation is different and odd.
An app Foo does not directly use ExifInterface at all. It depends on libraryFoo which is included as an AAR package. libraryFoo uses ExifInterface in a fragment.
When app…

Hong
- 17,643
- 21
- 81
- 142
1
vote
1 answer
how to resolve java.io.FileNotFoundException when trying to get inputstream from AWS url
my main goal is to get the orientation of a image which I get from AWS, part of the code is to first get the imputStream for which I need to pass the URI, I am doing Uri.parse(url) to get the uri and when I try to get URI I…

BRDroid
- 3,920
- 8
- 65
- 143
1
vote
1 answer
Does ExifInterface.TAG_SHUTTER_SPEED_VALUE really measure shutter speed? If so, how to convert it to a more standard format?
I'm trying to get camera shutter speed when a photo is taken with Android camera. Using this instruction in an image the app creates that contains the taken photo.
double vel = exif.getAttributeDouble(ExifInterface.TAG_SHUTTER_SPEED_VALUE, 0);
This…

user2638180
- 1,013
- 16
- 37