0

我希望从 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上使用了线程,例如: 从android浏览器启动自定义android应用程序

我做错了什么,还是有什么特别的事情要做才能让它发挥作用?我的应用程序支持 API 7。

干杯

4

1 回答 1

0

我使用: 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>
于 2011-12-13T11:00:47.660 回答