ReviewOS

also looking at this

craft-native/craft

feat(android): openURL and share — ratchet 98 -> 96

#145
Merged glennmichael123 wants to merge feat/android-intents into main
6 files +460 -3
packages/android/templates/CraftBridge.kt.templatemodified+4-0
Changes to packages/android/templates/CraftBridge.kt.template
@@ -1412,6 +1412,8 @@ class CraftBridge(
14121412
14131413 @JavascriptInterface
14141414 fun share(text: String, title: String) {
1415 if (CraftNative.share(activity, text, title)) return
1416
14151417 val intent = Intent(Intent.ACTION_SEND).apply {
14161418 type = "text/plain"
14171419 putExtra(Intent.EXTRA_TEXT, text)
@@ -2011,6 +2013,8 @@ class CraftBridge(
20112013
20122014 @JavascriptInterface
20132015 fun openURL(url: String): Boolean {
2016 if (CraftNative.openURL(activity, url)) return true
2017
20142018 return try {
20152019 val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
20162020 activity.startActivity(intent)