From 6d0254c5e5c3eff9d31e8cf67c9eca034e75e6dd Mon Sep 17 00:00:00 2001 From: iBaer Date: Mon, 18 Apr 2016 13:40:34 +0200 Subject: [PATCH] Fixed backup/restore for 3rd party applications (#255) * Same MIME for restore/backup, so 3rd party applications like Google Drive find the proper files. MIME changed to proper type for json files. * MIME type for restore temporaly on "application/*" so the cached file can also be chosen --- .../main/java/eu/kanade/tachiyomi/ui/backup/BackupFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/backup/BackupFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/backup/BackupFragment.kt index 153aed539..2c1a3e5a6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/backup/BackupFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/backup/BackupFragment.kt @@ -57,7 +57,7 @@ class BackupFragment : BaseRxFragment() { restore_button.setOnClickListener { val intent = Intent(Intent.ACTION_GET_CONTENT) intent.addCategory(Intent.CATEGORY_OPENABLE) - intent.type = "application/octet-stream" + intent.type = "application/*" val chooser = Intent.createChooser(intent, getString(R.string.file_select_backup)) startActivityForResult(chooser, REQUEST_BACKUP_OPEN) } @@ -76,7 +76,7 @@ class BackupFragment : BaseRxFragment() { fun onBackupCompleted(file: File) { dismissBackupDialog() val intent = Intent(Intent.ACTION_SEND) - intent.type = "text/plain" + intent.type = "application/json" intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file)) startActivity(Intent.createChooser(intent, "")) }