mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-28 01:59:50 +00:00
my messages
This commit is contained in:
2 files changed
+27
-2
No files matched your search
@@ -54,20 +54,37 @@ object GeodeUtils {
|
|||||||
selectFileCallback(path)
|
selectFileCallback(path)
|
||||||
return@registerForActivityResult
|
return@registerForActivityResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Toast.makeText(activity, R.string.file_select_error, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(activity, R.string.no_file_selected, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
failedCallback()
|
failedCallback()
|
||||||
}
|
}
|
||||||
openDirectoryResultLauncher = activity.registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) {
|
openDirectoryResultLauncher = activity.registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
val path = FileUtils.getRealPathFromURI(activity, it)
|
val path = FileUtils.getRealPathFromURI(activity, it)
|
||||||
if (path != null)
|
if (path != null) {
|
||||||
selectFileCallback(path)
|
selectFileCallback(path)
|
||||||
return@registerForActivityResult
|
return@registerForActivityResult
|
||||||
|
}
|
||||||
|
|
||||||
|
Toast.makeText(activity, R.string.file_select_error, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(activity, R.string.no_file_selected, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
failedCallback()
|
failedCallback()
|
||||||
}
|
}
|
||||||
openFilesResultLauncher = activity.registerForActivityResult(GeodeOpenFilesActivityResult()) { result ->
|
openFilesResultLauncher = activity.registerForActivityResult(GeodeOpenFilesActivityResult()) { result ->
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
|
Toast.makeText(activity, R.string.no_file_selected, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
|
|
||||||
failedCallback()
|
failedCallback()
|
||||||
return@registerForActivityResult
|
return@registerForActivityResult
|
||||||
}
|
}
|
||||||
@@ -88,6 +105,12 @@ object GeodeUtils {
|
|||||||
selectFileCallback(path)
|
selectFileCallback(path)
|
||||||
return@registerForActivityResult
|
return@registerForActivityResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Toast.makeText(activity, R.string.file_select_error, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
|
} else {
|
||||||
|
Toast.makeText(activity, R.string.no_file_selected, Toast.LENGTH_SHORT)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
failedCallback()
|
failedCallback()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@
|
|||||||
<string name="message_box_accept">OK</string>
|
<string name="message_box_accept">OK</string>
|
||||||
<string name="message_box_continue">Continue</string>
|
<string name="message_box_continue">Continue</string>
|
||||||
<string name="missing_permissions">Missing required permissions for this action!</string>
|
<string name="missing_permissions">Missing required permissions for this action!</string>
|
||||||
|
<string name="no_file_selected">File selection cancelled.</string>
|
||||||
|
<string name="file_select_error">Failed to get file.</string>
|
||||||
|
|
||||||
<!-- SettingsActivity strings -->
|
<!-- SettingsActivity strings -->
|
||||||
<string name="title_activity_settings">Settings</string>
|
<string name="title_activity_settings">Settings</string>
|
||||||
|
|||||||
Reference in new issue
Block a user