From af59f656b4239a24d611b12ab27a59f04146bd48 Mon Sep 17 00:00:00 2001
From: Adam Brown <adampsbrown@gmail.com>
Date: Wed, 1 Jun 2022 15:47:08 +0100
Subject: [PATCH] adding android 12 url deeplink support - urls must be
 verified in order for deeplinks to be enabled by the system

---
 changelog.d/5748.bugfix             | 1 +
 vector/src/main/AndroidManifest.xml | 8 ++++++++
 2 files changed, 9 insertions(+)
 create mode 100644 changelog.d/5748.bugfix

diff --git a/changelog.d/5748.bugfix b/changelog.d/5748.bugfix
new file mode 100644
index 0000000000..dbef92bfc8
--- /dev/null
+++ b/changelog.d/5748.bugfix
@@ -0,0 +1 @@
+Fixes Element on Android 12+ being ineligible for URL deeplinks
diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml
index c55852d7d8..5e55ddd748 100644
--- a/vector/src/main/AndroidManifest.xml
+++ b/vector/src/main/AndroidManifest.xml
@@ -193,6 +193,14 @@
 
                 <data android:scheme="https" />
                 <data android:host="riot.im" />
+            </intent-filter>
+            <intent-filter android:autoVerify="true">
+                <action android:name="android.intent.action.VIEW" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.BROWSABLE" />
+
+                <data android:scheme="https" />
                 <data android:host="app.element.io" />
                 <data android:host="mobile.element.io" />
                 <data android:host="develop.element.io" />