Background: There is a lot of information out there about App Indexing, app links, deep links, deep app links and whatnot - but almost all of them just rehash the same information without explaining the purpose of the different parts, using confusing terminology and just seem to be written for non-tech-people (SEO and marketing people) rather than for developers.
Anyway, I'm implementing App Indexing and deep linking into my app, and I thought I had it all (mostly) figured out. But then I started reflecting on what the purpose really is of those android-app://
links I have added to my website, and if I have really implemented them correctly or not.
I have an SSL website, let's call it https://mywebsite.com
, and an app, let's call its package name com.my.app
.
So for example on https://mywebsite.com/foo/bar
I have the following deep app link (is there a correct term??):
<link rel="alternate" href="android-app://com.my.app/http/mywebsite.com/foo/bar" />
Question 1: All of the examples I've seen have used this format, but since my website is using SSL, shouldn't I be using https
instead of http
, like this?
<link rel="alternate" href="android-app://com.my.app/https/mywebsite.com/foo/bar" />
Question 2: Now, if I try to open one of these links on my device, it doesn't work. I've tried using QR-code readers, typing it into the browser and even sending it as intent data using adb. The phone doesn't seem to understand the android-app://
scheme at all. I've seen some places that people recommend to test these links using QR-codes, but I've tried three different QR apps and none seem to handle them. So can I test them, and if so - how?
Question 3: What is the actual purpose of these links? My app handles https://mywebsite.com/foo/bar
using an intent filter, so what is the actual purpose of providing the android-app://com.my.app/http/mywebsite.com/foo/bar
link in my webpage?