Question

In Android there seems to be two different way of reading an image's metadata. I know that image's EXIF has data such as timestamp, orientation, gps tag, etc on it, but apparently, you could get the same information through MediaStore, per Android's documentation: developer.android.com/reference/android/provider/MediaStore.Images.ImageColumns.html

What's the difference between the two? Can it be safely assumed that data from both will ALWAYS be the same?

Was it helpful?

Solution

What's the difference between the two?

The MediaStore information contains a cached copy of some of that EXIF data, plus other metadata.

Can it be safely assumed that data from both will ALWAYS be the same?

No. If the MediaStore is up to date, then yes. However, images are files. Files can be changed. If the MediaStore indexes the image file in state A, then something modifies the image file to state B, unless something causes the MediaStore to update its cache, they will be out of sync.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top