user3331142
user3331142

Reputation: 1262

Ionic Android App Links (deeplink)

I'm setting up deeplinking, specifically App links and so far, when a user enters the desired url https://myapp.com and they have the app installed (the app has been signed), it only opens in the browser.

I've been able to setup custom URL scheme works well myappcustom://app works as expected if the user has the app installed.

The verification for the domain is available at https://myapp.com/.well-known/assetlinks.json without redirection

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.slatedev.notis",
    "sha256_cert_fingerprints":
    ["E5:64:86:D6:EE:F8:1B:72:2F:55:B0:21:98:8B:0B:C8:C5:22:D4:98:08:7E:61:23:B1:A5:6A:1B:68:E0:C0:71"]
  }
}]

I know that the file must be accessible with the following constraints from the Android Verification Webpage

  1. The assetlinks.json file is served with content-type application/json. I've verified that the header is returning this content-type
  2. The assetlinks.json file must be accessible over an HTTPS connection, regardless of whether your app's intent filters declare HTTPS as the data scheme. The file is available over https
  3. The assetlinks.json file must be accessible without any redirects (no 301 or 302 redirects) and be accessible by bots (your robots.txt must allow crawling /.well-known/assetlinks.json).There shouldn't be any redirect with a direct https://myapp.com access. I'm assuming that robots can access the url since I haven't setup a robots.txt file to prevent access at this point
  4. If your app links support multiple host domains, then you must publish the assetlinks.json file on each domain. See Supporting app linking for multiple hosts.Doesn't support multiple host domains
  5. Do not publish your app with dev/test URLs in the manifest file that may not be accessible to the public (such as any that are accessible accessible only with a VPN). A work-around in such cases is to configure build variants to generate a different manifest file for dev builds. while there are multiple domains listed (beta and production domains) but they are available to the public

I'm trying to figure out what might be the issue. Does myapp.com also need to be available without redirect? I would assume if I'm connecting with the https:// link that it wouldn't be an issue but maybe the robots that hit the verification don't use the https version of the link?

Any ideas what may be preventing the app links from connecting?

Upvotes: 1

Views: 1510

Answers (1)

user3331142
user3331142

Reputation: 1262

The issue ended up being the manner I was testing the app link. I was using codepen to test clicking a link which seemed like it should work since it worked for the custom url scheme.

The solution was to use a normal sharing method (like an email or message) and select the link. The app linking then worked as expected.

Upvotes: 0

Related Questions