Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## [1.0.1]

### 2026-04-27

- Fix: gallery multiple selection returning duplicate `uri` and `webPath` on Android devices where the MediaStore `_data` column is unavailable. Each selected image now gets a unique cache filename via `UUID.randomUUID()`.

## [1.0.0]

### 2026-04-10
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.ionic.libs</groupId>
<artifactId>ioncamera-android</artifactId>
<version>1.0.0</version>
</project>
<version>1.0.1</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ class IONCAMRFileHelper: IONCAMRFileHelperInterface {
var read: Int
val buffer = ByteArray(8 * 1024)
val extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) ?: "dat"
val targetFile = createCaptureFile(context, "file.${extension}")
val targetFile = createCaptureFile(context, "${UUID.randomUUID()}.${extension}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this seems to fix the issue, it brings up the situation of the cache size growing with the amount of files being returned from the gallery. But that also applies to the photos taken with camera.

Unlike iOS, the cached images are not cleared on app restart, only the videos.

That's possibly a discrepancy we should address one day, but guess this PR may not be the place for it (unless you disagree).

val outputStream: OutputStream = FileOutputStream(targetFile)
while (inputStream.read(buffer).also { read = it } != -1) {
outputStream.write(buffer, 0, read)
Expand All @@ -579,4 +579,4 @@ class IONCAMRFileHelper: IONCAMRFileHelperInterface {
}
return targetFile
}
}
}
Loading