自定义 Scheme(forwarder://main)用于唤起App

This commit is contained in:
pppscn 2021-09-27 13:58:08 +08:00
parent e11123de07
commit d65b305053

View File

@ -46,8 +46,13 @@
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<!--协议部分,随便设置-->
<data android:scheme="forwarder" android:host="main"/>
<!--下面这几行也必须得设置-->
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity