3

Not able to get QR code link to open my app, it always loads in browser.

I have added a intent filter in Manifest file as below -

When I have the link in as SMS message, https://pages.smart.link/abc and I click on that, it shows disambiguous dialog with my app as one of the options to open it.

<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="pages.smart.link"
                android:pathPrefix="/abc"
                android:scheme="https" />
        </intent-filter>

But if generate this link through QR code, it loads the URL in web browser - tested on Samsung Galaxy S8+

SMS option does NOT work if I have host as "myapp" with final url as myapp://pages.smart.link/abc myapp host works fine if launch it through command line as below -

adb shell am start -W -a android.intent.action.VIEW -d "myapp://pages.smart.link/abc" com.abc.myapp

<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="pages.smart.link"
                android:pathPrefix="/abc"
                android:scheme="myapp" />
        </intent-filter>
Rams_QA
  • 121
  • 7

0 Answers0