【问题标题】:Link from Android browser to my application not working从 Android 浏览器链接到我的应用程序不起作用
【发布时间】:2012-01-19 05:45:33
【问题描述】:

如果安装了我的应用程序,我希望能够从 android 浏览器启动我的应用程序,或者在其他情况下启动我的网站。 所以为了让它发挥作用,我放了:

<activity android:name=".MMLogin" android:label="MeetMe" android:theme="@android:style/Theme.NoTitleBar" android:screenOrientation="portrait">
        <intent-filter>
    <data android:scheme="http" android:host="meet-me.com" android:path="/signin" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE"/>
    <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>    
</activity>

在Manifest中,我创建了一个虚拟链接进行测试;而且它不工作。

  • 我尝试过使用和不使用:BROWSABLE 和 DEFAULT

  • 我已尝试使用 meetme://datas 并更改方案;没有任何效果。

我在 stackoverflow 上使用了线程,例如: Launch custom android application from android browser

我做错了什么,或者有什么特别的事情可以让它发挥作用? 我的应用程序支持 API 7。

干杯

【问题讨论】:

    标签: android android-intent android-browser


    【解决方案1】:

    我用过: Intent Filter to Launch My Activity when custom URI is clicked,我认为缺少的是这个块:

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <action android:name="android.intent.action.EDIT" />
        <action android:name="android.intent.action.PICK" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="application/myapp" />
    </intent-filter>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-09
      • 1970-01-01
      • 2016-12-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多