mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 19:03:21 +02:00
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
This commit is contained in:
parent
06681a3db7
commit
6d0254c5e5
@ -57,7 +57,7 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
|
|||||||
restore_button.setOnClickListener {
|
restore_button.setOnClickListener {
|
||||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||||
intent.type = "application/octet-stream"
|
intent.type = "application/*"
|
||||||
val chooser = Intent.createChooser(intent, getString(R.string.file_select_backup))
|
val chooser = Intent.createChooser(intent, getString(R.string.file_select_backup))
|
||||||
startActivityForResult(chooser, REQUEST_BACKUP_OPEN)
|
startActivityForResult(chooser, REQUEST_BACKUP_OPEN)
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
|
|||||||
fun onBackupCompleted(file: File) {
|
fun onBackupCompleted(file: File) {
|
||||||
dismissBackupDialog()
|
dismissBackupDialog()
|
||||||
val intent = Intent(Intent.ACTION_SEND)
|
val intent = Intent(Intent.ACTION_SEND)
|
||||||
intent.type = "text/plain"
|
intent.type = "application/json"
|
||||||
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file))
|
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file))
|
||||||
startActivity(Intent.createChooser(intent, ""))
|
startActivity(Intent.createChooser(intent, ""))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user