diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index b33f72f..f13600c 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -52,6 +52,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
uri.schemeSpecificPart?.nullIfEmpty()
- uri?.scheme == "market" && uri.host == "details" -> uri.getQueryParameter("id")?.nullIfEmpty()
- else -> null
+ uri?.scheme == "package" || uri?.scheme == "fdroid.app" -> {
+ uri.schemeSpecificPart?.nullIfEmpty()
+ }
+ uri?.scheme == "market" && uri.host == "details" -> {
+ uri.getQueryParameter("id")?.nullIfEmpty()
+ }
+ uri != null && uri.scheme in setOf("http", "https") -> {
+ val host = uri.host.orEmpty()
+ if (host == "f-droid.org" || host.endsWith(".f-droid.org")) {
+ uri.lastPathSegment?.nullIfEmpty()
+ } else {
+ null
+ }
+ }
+ else -> {
+ null
+ }
}
}