diff --git a/app/src/main/java/com/geeksville/mesh/ui/ChannelFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/ChannelFragment.kt
index 8caa6b9d..95f6de77 100644
--- a/app/src/main/java/com/geeksville/mesh/ui/ChannelFragment.kt
+++ b/app/src/main/java/com/geeksville/mesh/ui/ChannelFragment.kt
@@ -1,5 +1,6 @@
package com.geeksville.mesh.ui
+import android.content.ActivityNotFoundException
import android.content.Intent
import android.graphics.ColorMatrix
import android.graphics.ColorMatrixColorFilter
@@ -143,8 +144,17 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
type = "text/plain"
}
- val shareIntent = Intent.createChooser(sendIntent, null)
- requireActivity().startActivity(shareIntent)
+ try {
+ val shareIntent = Intent.createChooser(sendIntent, null)
+ requireActivity().startActivity(shareIntent)
+ }
+ catch(ex: ActivityNotFoundException) {
+ Snackbar.make(
+ binding.shareButton,
+ R.string.no_app_found,
+ Snackbar.LENGTH_SHORT
+ ).show()
+ }
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8e2d4774..1e930b4a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -102,4 +102,5 @@
Are you sure you want to change to the default channel?
Reset to defaults
Apply
+ No application found to send URLs