properly fetch the Date Taken value on Android 10

This commit is contained in:
tibbi 2019-09-12 20:21:25 +02:00
parent dc79e4531f
commit af3b4e46f0
2 changed files with 4 additions and 2 deletions

View file

@ -62,7 +62,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.17.13'
implementation 'com.simplemobiletools:commons:5.17.16'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -304,7 +304,9 @@ class MediaFetcher(val context: Context) {
try {
val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
dateTakens[path] = dateTaken
if (dateTaken != 0L) {
dateTakens[path] = dateTaken
}
} catch (e: Exception) {
}
} while (cursor.moveToNext())