我有一个Android应用程序,应该在应用程序上打开从Web浏览器点击的链接。
我有以下意图过滤器:
if (strncmp(in, "Hello", strlen("Hello")) == 0) ...
我还检查了我在mysite / .well-known / assetlinks.json中的assetjson文件中签名的sha256密钥,包名等。万事都看对了。但是当我点击网站上的链接时,应用程序仍无法打开。
答案 0 :(得分:1)
<activity android:name=".YourActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</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:scheme="http" />
<data android:host="mysite.com" />
</intent-filter>
</activity>