Skip to content
This repository has been archived by the owner on Sep 8, 2019. It is now read-only.

Commit

Permalink
- now displaying MediaStore DateTaken, when there is no Exif Data
Browse files Browse the repository at this point in the history
  • Loading branch information
kollerlukas committed Jun 20, 2017
1 parent bd455df commit b79ee6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/main/java/us/koller/cameraroll/ui/ItemActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import us.koller.cameraroll.R;
Expand Down Expand Up @@ -707,6 +710,11 @@ public void run() {
int[] imageDimens = albumItem.getImageDimens(ItemActivity.this);
height = String.valueOf(imageDimens[1]);
width = String.valueOf(imageDimens[0]);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
Locale locale = getResources().getConfiguration().getLocales().get(0);
date = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", locale)
.format(new Date(albumItem.getDate()));
}
}

final String[] values = {name, path, size, width + " x " + height,
Expand Down

0 comments on commit b79ee6d

Please sign in to comment.