From b18e8aa11e0f20df1f89e2a21d08cf0e9a984edf Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sat, 16 Mar 2024 12:53:23 +0000 Subject: [PATCH] Allow importing files with MIME type "application/octet-stream" Sometimes Android reports the MIME type as "application/octet-stream" even if the file has a .json extension (specifically, on Android 8 and 9 for backups exported outside the Download folder). Previously, such files could not be selected in the file picker when importing. As a workaround, allow files with that MIME type. Fixes #88. --- .../kotlin/org/fossify/messages/activities/SettingsActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt index a31f1eb0c..f9c91b031 100644 --- a/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/messages/activities/SettingsActivity.kt @@ -27,7 +27,7 @@ class SettingsActivity : SimpleActivity() { private var blockedNumbersAtPause = -1 private var recycleBinMessages = 0 private val messagesFileType = "application/json" - private val messageImportFileTypes = listOf("application/json", "application/xml", "text/xml") + private val messageImportFileTypes = listOf("application/json", "application/xml", "text/xml", "application/octet-stream") private val binding by viewBinding(ActivitySettingsBinding::inflate)