mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-23 03:37:28 +02:00
allow importing both txt and json files
This commit is contained in:
parent
03d0ea826b
commit
88100ea5ae
@ -649,9 +649,11 @@ class MainActivity : SimpleActivity() {
|
||||
} else {
|
||||
Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
|
||||
addCategory(Intent.CATEGORY_OPENABLE)
|
||||
type = "text/*"
|
||||
type = "*/*"
|
||||
|
||||
try {
|
||||
val mimetypes = arrayOf("text/*", "application/json")
|
||||
putExtra(Intent.EXTRA_MIME_TYPES, mimetypes)
|
||||
startActivityForResult(this, PICK_OPEN_FILE_INTENT)
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
toast(R.string.system_service_disabled, Toast.LENGTH_LONG)
|
||||
|
Loading…
x
Reference in New Issue
Block a user