8

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.

Ashwath Shetty
  • 106
  • 1
  • 10
Avallone
  • 331
  • 1
  • 9
  • Since is a test app is not public available, as I mentioned is "published on Alpha" so in on GooglePlay but only available for my. tester. I'm using verion "com.google.android.gms:play-services-instantapps:17:0.0" – Avallone Sep 16 '20 at 11:12
  • I don't have extra information to add because the issue is not something to debug, is not code issue but steps needed to make it work. I already follow many tutorials and guides about instantApps and the basics are all ok and working. This feature (clicking on a link from a phone that does not have your app and launching the instantApp) I don't find on this those tutorials, so I believe there is a missing step somewhere. Even the basics I found steps on tutorials that are not listed on Google's tutorial. – Avallone Sep 16 '20 at 11:23
  • The link can be anywhere, on a email, on a web site, someone can send on chat. Is a https url. Is a simple url like "https://www.myinstantapp.com/testlink" (this is not the real url) and as I mentioned I followed the App Links Assistant process and got a ok for the setup. – Avallone Sep 16 '20 at 12:40
  • like this (`https://www.myinstantapp.com/testlink`)? – Avallone Sep 16 '20 at 12:50
  • @blackapps I've edited the question to address some of your issues, do you think some other important information is missing? – Daniele Segato Sep 17 '20 at 09:58
  • I dont know. I hope someone else helps. – blackapps Sep 17 '20 at 10:33
  • Check if it at least works with this link(replace package name): https://play.google.com/store/apps/details?id=com.your.package&hl=en&launch=true – Torkel Velure Sep 23 '20 at 07:10
  • Thanks @TorkelVelure but is not a link for the google play that I was trying to do. I was trying to make that the link from my website triggers the InstantApp version in case is an Android phone and if is not will just displays the website on the browser. – Avallone Sep 24 '20 at 07:45
  • I know, but if the link i posted works, then you will know for sure that at least *a* link works with the app and it narrows down the debugging scope :) – Torkel Velure Sep 24 '20 at 08:49
  • @Avallone did you found any solution for this? – SachinS Aug 13 '22 at 06:05

2 Answers2

3

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.

Avallone
  • 331
  • 1
  • 9
  • Thanks for this info. I have the same issue. I will try android:order and pathPattern to see if it will help. BTW, do you have a TRY NOW button on Google Play as well? – andude Oct 27 '20 at 15:53
  • Actually for my case it had nothing to with any of this. Play Console (new one) does not allow publishing instant apps (as of now). We had to publish it separately on Classic Console (they say is available only until Nov 2, 2020. So, I am sure they will have some new way of publishing app bundle with all features). More info at https://stackoverflow.com/questions/62890092/how-to-manage-instant-app-in-new-google-play-console – andude Oct 30 '20 at 18:40
0

I had the same problem, and it was because I didn't have android:targetSandboxVersion="2" in my application tag.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31083656) – tomerpacific Feb 20 '22 at 17:31