Android 创建自定义方案
Android create custom scheme
如何为 android 创建自定义方案,以便我可以在 Intent 过滤器中使用它。我的 url 是 https://myquest.io/?ref=abc 这里 abc 会随着用户的不同而变化。我将用不同的用户 ID 替换 "abc" 并在用户单击 link 时启动 gmail app.Then 它将被意图过滤器
捕获
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="Quest"/>
</intent-filter>
我试过用<a href="https://myquest.io">Quest</a>
,但是没有working.Can有人帮我提前解决this.Thanks
试试这个
<intent-filter>
<data android:scheme="http" android:host="myquest.io"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
如何为 android 创建自定义方案,以便我可以在 Intent 过滤器中使用它。我的 url 是 https://myquest.io/?ref=abc 这里 abc 会随着用户的不同而变化。我将用不同的用户 ID 替换 "abc" 并在用户单击 link 时启动 gmail app.Then 它将被意图过滤器
捕获<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="Quest"/>
</intent-filter>
我试过用<a href="https://myquest.io">Quest</a>
,但是没有working.Can有人帮我提前解决this.Thanks
试试这个
<intent-filter>
<data android:scheme="http" android:host="myquest.io"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>