0

I have already looked at most questions with similar topic and got how intent-filters work, but I cannot make android to launch my app. Here is the relevant part of manifest:

    <activity
        android:name=".UriHandler" >
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:scheme="myapp" />
        </intent-filter>
    </activity>

I try clicking the following link from the default browser:

<a href="myapp://param1/param2/param3">Test</a>

Instead of starting my app it just tries to load the URI as an address. What am i missing?

Update: To make it work you need to add

<category android:name="android.intent.category.BROWSABLE" />

to the intent, also ignore Lint and do not add

android:exported="false"

in my case it crushed Browser.

  • ok is it opening the link in default browser rather than you app browser activity... then you may clear the browser saved cache.. So as to make sure that the uri of device has no default action being set to the browser(default) – Arpit Garg Sep 30 '12 at 13:22
  • Clearing cache didn't work. Actually my app should not be used for browsing, that category was there by mistake. Also 'android:exported="false"' crashed browser upon link click. – Nikolay Morozov Sep 30 '12 at 13:36
  • please refer to this: I have used this things.. please clear you exact problem.. So that i can help you http://developer.android.com/training/basics/intents/filters.html – Arpit Garg Sep 30 '12 at 13:43
  • also check this one: http://stackoverflow.com/questions/2430045/how-to-register-some-url-namespace-myapp-app-start-for-accessing-your-progr/2430468#2430468 – Arpit Garg Sep 30 '12 at 13:45

0 Answers0