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.
This commit is contained in:
Tom Levy 2024-03-16 12:53:23 +00:00
parent 1c7376c0f2
commit b18e8aa11e

View file

@ -27,7 +27,7 @@ class SettingsActivity : SimpleActivity() {
private var blockedNumbersAtPause = -1 private var blockedNumbersAtPause = -1
private var recycleBinMessages = 0 private var recycleBinMessages = 0
private val messagesFileType = "application/json" 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) private val binding by viewBinding(ActivitySettingsBinding::inflate)