8

I am trying App Linking from URL in Android , that is opening app directly when clicking a respective link without showing suggestions from intent chooser (app not yet live in play store )

Eventhough all of my configs are correct ... Direct app Link is not working , only I am getting app name in the suggestions

I also tried with app link verifier from google .

It having an weird issue

showing not working

In the initial attempts , its showing as No app deep linking permission found for app.glowify.glowify at admin.glowify.com.

After clicking Test Statement button 2 or 3 times , I am getting "grants deep linking"

working deep link

So I cross-checked the json in URL with the json from "Generate Statement" with json uploaded in the link https://admin.glowify.app/.well-known/assetlinks.json using JSON comparing tools and they confirmed that both contents are identical

But still app link not directly opening app .

So I check my manifest files again

Here is that:

<activity
    android:name=".ui.entry.EntryActivity"
    android:screenOrientation="portrait">

    <intent-filter android:label="Glowify" 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="admin.glowify.app"
            android:pathPrefix="/password/verification"
            android:scheme="http" />
        <data
            android:host="admin.glowify.app"
            android:pathPrefix="/password/verification"
            android:scheme="https" />
        <data
            android:host="admin.glowify.app"
            android:pathPrefix="/room"
            android:scheme="http" />
        <data
            android:host="admin.glowify.app"
            android:pathPrefix="/room"
            android:scheme="https" />
        <data
            android:host="admin.glowify.app"
            android:pathPrefix="/user/verification"
            android:scheme="http" />
        <data
            android:host="admin.glowify.app"
            android:pathPrefix="/user/verification"
            android:scheme="https" />
    </intent-filter>
</activity>

I check with these code and they seems to be fine !!!

But still I can't get my direct app linking to work . Only getting app name in intent suggestion to open

I read many stack overflow questions , but none of them helped or matches

Kindly please help me to resolve this issue

RagAnt
  • 1,064
  • 2
  • 17
  • 35
  • Are you definitely signing the app with the correct certificate to match the fingerprints? We had a similar issue and this was the cause. – Chris Apr 26 '21 at 16:51
  • Can you try creating separate intent filters for each of the data? Like ** ** – Sarah Khan Apr 26 '21 at 21:12
  • @Chris Yes. I checked with keytool -printcert -jarfile glowify-app-release.apk .. Same sha-256 key as in assetsliknks.json – RagAnt Apr 27 '21 at 07:55
  • @LordCommander are you trying to open the app by clicking a url scheme like: https://admin.glowify.app/room in a debug mode (debug apk)? or using a release.apk file which has the above Sha-256 you are testing? I had a similar issue where the Sha-256 was for my release.apk and when i was trying to test it with a debug.apk (which the sha-256 was different) it was opening my app via intent suggestion and when i have tested with release.apk it was opening my app directly. – MariosP Apr 28 '21 at 12:04
  • @MariosP. Yes I am using only release app that having that SHA-256 . I tested using key tool . Even I uninstall debug app first and installed release apk without updating and doing clean install . But still issue persists – RagAnt Apr 28 '21 at 13:37
  • @LordCommander did you declare in your manifest file under tag the below ? where this string will be your web page link for assetlinks.json [{\"include\": \"https://admin.glowify.app/.well-known/assetlinks.json\"}] – MariosP Apr 28 '21 at 14:22
  • @LordCommander this link https://developer.android.com/studio/write/app-link-indexing has all the tools from Android Studio to generate correct the assetlinks.json file where in section "Associate your app with your website" the button "Link and verify" step will generate the above meta-data android:name="asset_statements" and will verify if your are missing something. – MariosP Apr 28 '21 at 14:57
  • Can we know more what are you trying? and maybe elaborate on "But still I can't get my direct app linking to work . Only getting app name in intent suggestion to open" – Sherif elKhatib May 01 '21 at 03:09
  • @SherifelKhatib That means , I able to get the app name in "Open with " suggestion drop down . But direct opening is not working – RagAnt May 03 '21 at 11:22
  • @LordCommander Maybe you installed the app twice or there is another app with same deeplink. Try to uninstall all other apps that you did on the phone (sample apps or anything like that) – Sherif elKhatib May 06 '21 at 09:29
  • @SherifelKhatib I tried with multiple phones . Same issue – RagAnt May 20 '21 at 04:52

2 Answers2

3

In my case, the problem was due to the assetlinks.json response content type.

The assetlinks.json file must be served as Content-Type: application/json in the HTTP headers, and it cannot be a redirect (that is, 301 or 302 response codes are not followed).

Mikhail Sharin
  • 3,661
  • 3
  • 27
  • 36
0

Just an add on: getting filename wrong can also show this error. Do verify the file name and path are correct. I mistakingly had the filename as asset-links.json, while Google service searched for assetlinks.json. Cheers

Pratik Agarwal
  • 300
  • 4
  • 16