Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(mobile): receive styled Android share text

tianma-ifdd2b8a6942c3
diff --git a/patches/[email protected] b/patches/[email protected]
index 301f3405..017a6bbd 100644
--- a/patches/[email protected]
+++ b/patches/[email protected]
@@ -8,6 +8,9 @@ index 8dd50e8f..396ebf35 100644
+ return if (uri != null) {
+ listOf(createUriPayload(context, uri, type))
+ } else if (type == "text/plain") {
+@@ -21 +24 @@ internal class SimpleShareIntentDataParser {
+- val text = intent.getStringExtra(Intent.EXTRA_TEXT) ?: return emptyList()
++ val text = intent.getCharSequenceExtra(Intent.EXTRA_TEXT)?.toString() ?: return emptyList()
@@ -31,4 +34 @@ internal class SimpleShareIntentDataParser {
- } else {
- val uri = intent.getParcelableExtraCompat<Uri>(Intent.EXTRA_STREAM)
@@ -35,6 +38,9 @@ index 5f4d9423..8555d93a 100644
- listOfNotNull(uri?.let { resolveUri(context, it, type) })
- }
+ } else emptyList()
+@@ -42 +42 @@ class ResolvingShareIntentDataParser {
+- val text = intent.getStringExtra(Intent.EXTRA_TEXT) ?: return emptyList()
++ val text = intent.getCharSequenceExtra(Intent.EXTRA_TEXT)?.toString() ?: return emptyList()
@@ -61 +61,3 @@ class ResolvingShareIntentDataParser {
- val specificMimeType = contentResolver.getType(uri) ?: mimeType
+ val specificMimeType = contentResolver.getType(uri)