Skip to content

Commit 4a25c3f

Browse files
committed
Fix resolving intent triggered via am start -d <link>
1. If the activity has too many matching intent filters, it doesn't work. 2. If the intent filter has any categories other than `android.intent.category.DEFAULT`, it doesn't work. Likely a bug in the AOSP. Signed-off-by: Muntashir Al-Islam <muntashirakon@riseup.net>
1 parent bba53eb commit 4a25c3f

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,71 @@
728728
android:label="@string/interceptor"
729729
android:taskAffinity=""
730730
android:windowSoftInputMode="stateUnchanged">
731+
<!-- DEFAULT category + scheme. This must be located on top -->
732+
<intent-filter>
733+
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
734+
<action android:name="android.service.quicksettings.action.QS_TILE" />
735+
<action android:name="android.intent.action.VIEW" />
736+
<action android:name="android.intent.action.EDIT" />
737+
<action android:name="android.intent.action.PICK" />
738+
<action android:name="android.intent.action.GET_CONTENT" />
739+
<action android:name="android.intent.action.CREATE_DOCUMENT" />
740+
<action android:name="android.intent.action.OPEN_DOCUMENT" />
741+
<action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
742+
<action android:name="android.intent.action.INSERT" />
743+
<action android:name="android.intent.action.INSERT_OR_EDIT" />
744+
<action android:name="android.intent.action.CALL_BUTTON" />
745+
<action android:name="android.intent.action.DIAL" />
746+
<!-- Used by camera to view photo taken -->
747+
<action android:name="android.provider.action.REVIEW" />
748+
<action android:name="android.provider.action.REVIEW_SECURE" />
749+
<action android:name="com.android.camera.action.REVIEW" />
750+
<action android:name="com.android.camera.action.SPLIT_SCREEN_REVIEW" />
751+
752+
<category android:name="android.intent.category.DEFAULT" />
753+
754+
<data android:scheme="http" />
755+
<data android:scheme="https" />
756+
<data android:scheme="about" />
757+
<data android:scheme="javascript" />
758+
<data android:scheme="mailto" />
759+
<data android:scheme="geo" />
760+
<data android:scheme="file" />
761+
<data android:scheme="content" />
731762

763+
<data android:scheme="rtsp" />
764+
<data android:scheme="rtmp" />
765+
<data android:scheme="ftp" />
766+
<data android:scheme="sftp" />
767+
768+
<data android:scheme="skype" />
769+
<data android:scheme="sms" />
770+
<data android:scheme="smsto" />
771+
<data android:scheme="mms" />
772+
<data android:scheme="mmsto" />
773+
<data android:scheme="zxing" />
774+
<data android:scheme="spotify" />
775+
<data android:scheme="tel" />
776+
<data android:scheme="voicemail" />
777+
<data android:scheme="view-source" />
778+
<data android:scheme="sqlite" />
779+
780+
<!-- Intercept Alipay links -->
781+
<data android:scheme="alipays" />
782+
783+
<!-- Intercept Google play links -->
784+
<data android:scheme="market" />
785+
<data android:scheme="store" />
786+
<data android:scheme="android" />
787+
788+
<!-- Intercept WeChat links -->
789+
<data android:scheme="weixin" />
790+
791+
<!-- Intercept WhatsApp links -->
792+
<data android:scheme="whatsapp" />
793+
<data android:scheme="whatsapp-sheet" />
794+
<data android:scheme="whatsapp-consumer" />
795+
</intent-filter>
732796
<!-- matching any given mime type -->
733797
<intent-filter tools:ignore="AppLinkUrlError">
734798
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />

0 commit comments

Comments
 (0)