androidcustom-urluri-scheme

Not able to open tha app from URL using Custom URI scheme


I'm trying to open my app from URL which is send either in SMS or in Email. But it will not open my application.

Here is the code i have used in AndroidManifest File.

 <activity
        android:name=".TestActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <data
                android:host="http"
                android:scheme="m.special.scheme" />

            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

Here is the URL i have passed in the email

http://m.special.scheme/other/parameters/here

I have also try this m.special.scheme://other/parameters/here

But this will show as a static text in email not as a URL.

Help me!!!


Solution

  • You have the "hosts" and "scheme" values swapped.. it should be:

    <data android:host="m.special.scheme" android:scheme="http"></data>
    

    Then this URL http://m.special.scheme/other/parameters/here should open your app...

    See this answer for more info.