android deeplink, force open externally

Viewed 1846

I am developing an android app which accepts deeplink. For example consider this one:

        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:host="returnapp" android:scheme="testscheme" />
        </intent-filter>

So if we call the url testscheme://returnapp/?status=1 then app should be opened.

In Google Chrome it opens up and everything goes right but in firefox, the app gets opened as child of browser task (which has the link to my app). But I want it to be opened independently.

So is there something to add to manifest to force this attribute or I should add some keyword in my HTML href?

UPDATE

I think I should make a change in the link showing in webpage in firefox. Currently I am using this link:

<h1><a href="testscheme://returnapp/?status=1">test</a></h1>

Something like target="_system" to tell firefox to open this link externally.

1 Answers

The browsers itself need to support and implment the browsability. The browsers have to find other activities supporting android.intent.category.BROWSABLE when opening a web-page.

So as you say, Firefox is not supported for opening app directly, however there is a solution you can try is to add android:autoVerify="true" in any one of the web URL intent filters in your app manifest that include the android.intent.action.VIEW intent action and android.intent.category.BROWSABLE intent category, as shown in the following manifest code snippet:


    <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:host="returnapp" android:scheme="testscheme" />
         </intent-filter>

Even though I'm still not sure this gonna work because of android:autoVerify="true" is for appLink not for deepLink

Related