0

I developed my first Android instant app which is now available on Google Play.
I want to invoke the app from a web page in Chrome, but it doesn't work.

Taking Wish (www.wish.com) as an example, I tried the following links on Chrome for Android.

1: <a href="https://www.wish.com/">link1</a>

2: <a href="intent://www.wish.com/#Intent;action=com.google.android.instantapps.START;scheme=https;package=com.google.android.instantapps.supervisor;S.browser_fallback_url=https%3A%2F%2Fwww.wish.com%2F;S.android.intent.extra.REFERRER_NAME=https%3A%2F%2Fwww.google.co.jp;launchFlags=0x8080000;end">link2</a>

But neither link above does work (clicking them just navigates to the Web page of Wish, but no instant app shows up), Although the second one seems to be what Google is using in their search result page.

I also confirmed the app can be launched via an am command like:

am start -a com.google.android.instantapps.START -c android.intent.category.BROWSABLE -d https://www.wish.com/

Does anybody know how to launch instant apps from a web page?

Android 7.0 on Galaxy S8
Chrome for Android 60.0.3112.116

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
ttera29
  • 5
  • 4
  • can you check https://www.howtogeek.com/308548/how-to-find-and-use-android-instant-apps/ and https://support.google.com/googleplay/android-developer/answer/7381861 for more understanding and write back if you have still issues. – Prags Dec 21 '17 at 03:17
  • can you check url https://developer.android.com/topic/instant-apps/faqs.html and find for **How do instant apps show up in Google web search?** – Prags Feb 13 '18 at 07:55
  • if you have any issues I'd recommend filing your issue with Google, then link to it back in here It would be helpful for all, thanks! https://issuetracker.google.com/issues/new?component=316045&template=1018787 – Prags Feb 13 '18 at 08:01

2 Answers2

0

I found solution for this problem by create dynamic links from Firebase Dynamics Links https://firebase.google.com/docs/dynamic-links in Firebase console. There is an option for send user to instant apps when the app isn't installed. I found it from https://developer.android.com/topic/instant-apps/faqs.html (in App Links, deep linking, and URL handling section)

Like this

Sorry for my English.

  • Firebase Dynamic Link worked just fine. Thank you Saran, Andoctorey and Prags. And I'm sorry for the late reply. – ttera29 Feb 21 '19 at 19:42
0

Only Firebase Dynamics Links can open instant app from web. You can easy generate it manually but first check how it work in firebase console. Use Link Details and Link Preview once you created test link.

Example Link:

https://firebase.page.link/?link=https://instant.example.com&apn=package_name&afl=https://example.com

Example instant app configuration in manifest:

    <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:scheme="http" />

            <data
                android:host="instant.example.com"
                android:pathPrefix="/"
                android:scheme="https" />
        </intent-filter>

        <meta-data
            android:name="default-url"
            android:value="https://instant.example.com" />
    </activity>
Andoctorey
  • 728
  • 9
  • 11