0

I've read a tutorial on how to launch an app from a link on the browser. I've created an activity 'TestLaunch'.

 <activity
        android:name=".TestMe"
        android:label="Test">
        <intent-filter>
            <data android:scheme="testme.com" />
            <action android:name="android.intent.action.VIEW" />
        </intent-filter>

</activity>

Then I connected my android phone and clicked 'debug' on Eclipse. The app launched as usual. I openned the browser and typed 'testme.com'. The activity was not started as expected. Is this because the app is not fully installed on the phone or because I am understanding wrongly how the intent filter works?

4

1 回答 1

1

尝试这个:

 <activity
    android:name=".TestMe"
    android:label="Test">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT"></category>
        <category android:name="android.intent.category.BROWSABLE"></category>
        <data android:host="www.testme.com" android:scheme="http"></data>
    </intent-filter>
 </activity>
于 2012-10-21T16:33:54.610 回答