0

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

Sandeep Singh
  • 1,099
  • 2
  • 10
  • 28

2 Answers2

1

Your Intent filter is wrong. You are providing wrong scheme and host value.

<activity
        android:name=".TestActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <data
                android:scheme="http"
                android:host="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>
Kishan Vaghela
  • 7,008
  • 3
  • 36
  • 63
0

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.

Community
  • 1
  • 1
Buddy
  • 10,120
  • 5
  • 37
  • 57