Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InstantApp not being launched when clicking on link

My test app is published in a test closed track in Google Play (alpha) - but I've also tried with Internal Testing, the same result.

It already shows the button "try now" after fixing the missing default-URL. assetlinks.json placed on my server in the right place. The App Links Assistant process fully configured.

I can't release my app publicly yet.

My instant app link looks something like this: https://my.host/my/path?paramA=1

On my Instant module manifest i declared:

            <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"
                    android:host="my.host"
                    android:pathPrefix="/my/path"/>
                <data
                    android:scheme="https"/>
            </intent-filter>
            <meta-data
                android:name="default-url"
                android:value="https://my.host/my/path" />

I've followed the google play opt-in to become a tester of my own app.

I'm fairly confident I've integrated it correctly because:

  • If I click on try now from the Google Play page my instant app will open (and Android will keep it in cache). If I then open the link (for example from an email), it works fine: opens the instant experience as I expect (probably because it is in the cache).

  • If I have the full app installed opening the link works fine: opens the app where it should go.

But...

  • If I never opened the instant (removed from the cache on the device) nor have the app installed, opening the link does not bring me to the instant app (should load the instant app from the GooglePlay since you don't have it) instead it brings me to the website.

Does anyone has any idea or know of any additional step not mentioned in the official doc?

InstantApps version com.google.android.gms:play-services-instantapps:17:0.0

extra info, the option on Google Play for instant apps is on and I already tried turning off and back on.

If you think I omitted important details please comment my question and I'll try to add them

Thanks.

like image 598
Avallone Avatar asked Sep 15 '20 10:09

Avallone


People also ask

Why is my instant app not working?

Fix Instant Apps issues via Application ManagerGo to Settings and then Applications. Find the Application manager and locate Google Play services for Instant Apps. Find Application info and Force stop the app. Then, you should Clear data and Clear cache.

Why links are not opening in app?

Every android app will have list of urls that it can open. So you have to go to that app settings and tell that it should open in browser for the urls and not in the app. To do that go to Settings -> Apps -> scroll down to the app that you don't want URLs to open in -> Tap on 'Open by Default' and select always Ask.


1 Answers

While searching for an answer I tried to find something from the devs of the apps that I saw this feature working. I found this article and I notice only two differences from what I was doing:

  1. android:order="1", I never used so I looked to see what does and as far as I understood, in case of deep link that can be access by multiples apps this can give "priority" to yours. The default value is 0.

  2. android:pathPattern="/item/.*" I was using "android:pathPrefix" on mine without .* in the end. Since my url also has params I decided to try this modification.

  • One thing that I notice is that even after published, wasn't working instantly, since I had a weekend when I tried on Monday was working, so apparently there is also some indexing time from the GooglePlay.

My test app is on Internal Testing and is working.

like image 80
Avallone Avatar answered Sep 21 '22 09:09

Avallone