fix(dialog): use parsed MIME type for Android save dialog (#3519)

This commit is contained in:
purvsinojiya-inventyv authored and GitHub committed 2026-07-29 17:05:43 +02:00
1 parent dc7f87bc7e
commit cc9ec9b4ad
2 files changed
+10 -3

No files matched your search

@@ -204,9 +204,10 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
intent.addCategory(Intent.CATEGORY_OPENABLE)
intent.putExtra(Intent.EXTRA_TITLE, args.fileName ?: "")
intent.type = "*/*"
if (parsedTypes.isNotEmpty()) {
if (parsedTypes.size == 1) {
intent.type = parsedTypes.first()
} else {
intent.type = "*/*"
intent.putExtra(Intent.EXTRA_MIME_TYPES, parsedTypes)
}