Roa*_*ies 19 email twitter url android html-email
我想从电子邮件URL打开我的应用程序,基本上就像下面显示的Twitter.com示例.
电子邮件链接:

选择打开应用程序或浏览器:

点击应用程序选项后,Twitter应用程序将打开:

我尝试了以下代码,但它无法正常工作:
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="www.twitter.com" android:scheme="http"></data>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
如果有人有正确的答案,请在这里写一些例子.
hem*_*emu 14
以下代码对我有用:
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data
android:host="www.my.app.com"
android:path="launch"
android:scheme="http"></data>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
将电子邮件链接设置为http://www.my.app.com/launch.
例如:您的网址将类似于https://roadies.com并且您的清单中有意图过滤器,如下所示
android:name="com.droid.MainActivity"
android:label="@string/app_name" >
<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:host="roadies.com"
android:scheme="https" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
58816 次 |
| 最近记录: |