1

I am trying to open an Android app from a browser. I have read several StackOverflow threads describing a solution to the problem and this is what I have so far:

AndroidManifest.xml

<activity
        android:name="com.webviewtestapp.MainActivity"
        android:label="@string/app_name"
        android:exported="true" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.LAUNCHER" />
            <data android:scheme="Testapp" android:host="launch"/>
        </intent-filter>
</activity>

And this is the html <a href="Testapp://launch"> open testapp </a

I am using the Firefox browser in Chrome and clicking the link gives a message: Couldn't find an application to open this link

How do I fix this ?

Ashish Agarwal
  • 14,555
  • 31
  • 86
  • 125

1 Answers1

1

Change:

<action android:name="android.intent.action.MAIN" />  

to:

<action android:name="android.intent.action.VIEW" />
ramaral
  • 6,149
  • 4
  • 34
  • 57