简体   繁体   中英

Link from Android browser to my application not working

I want from the android browser be able to launch my application if it's installed, or launch my website in the other case. So in order to make it work, I put :

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

in the Manifest , and I created a dummy link to test; and it's not working.

  • I've tried with and without: BROWSABLE and DEFAULT

  • I've tried with meetme://datas and change the scheme; nothing worked.

I used threads on stackoverflow like : Launch custom android application from android browser

What am I doing wrong, or is there a special thing to do to make it work ? My application suppports from API 7.

Cheers

I used : Intent Filter to Launch My Activity when custom URI is clicked , I think what was missing is this block :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM