【问题标题】:Android create custom schemeAndroid 创建自定义方案
【发布时间】:2016-09-01 11:42:35
【问题描述】:

如何为 android 创建自定义方案,以便我可以在意图过滤器中使用它。我的网址是 https://myquest.io/?ref=abc 这里 abc 会随着不同的用户而改变。我将用不同的用户 ID 替换“abc”并启动 gmail 应用程序。然后当用户单击链接时,它将被意图过滤器捕获

<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>

我尝试使用&lt;a href="https://myquest.io"&gt;Quest&lt;/a&gt;,但它不起作用。谁能帮我解决这个问题。提前致谢。

【问题讨论】:

标签: android android-intent intentfilter


【解决方案1】:

试试这个

           <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>

【讨论】:

  • 请您选择答案以供将来参考?
猜你喜欢
  • 1970-01-01
  • 2011-04-30
  • 2011-12-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多