How do you create a link on a website which opens a mobile app ?

How do you create a link on a website which opens a mobile app ?
tommelkonianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerIT ManagerCommented:
A mobile app can register the URL already. Whenever the URL is presented, the app opens up. It's NOT the way you want to force it from the link. It has to originate from the app already.
Usually it's safer to use your mobile banking app to process your payments, and typing errors/phishing (whereby the user doesn't check the green lock) would present you the (fake) website, whereas real links would have opened up the banking app.
tommelkonianAuthor Commented:
Thanks - But I'm not totally clear on what you are saying.
Do you mean that we need to put something into the code of the mobile app first, and then create a link to it ?
I'm reading about this and I see there a tag <intent-filter> that looks like it could be used to register the URL in the App  . Is that what you mean?

Thanks again

Tom
Ryan ChongSoftware Team LeadCommented:
How do you create a link on a website which opens a mobile app ?
if you mean a website's page, so it depends on how you program it and perhaps on what web browser you are using.

but as far as what I know, you can't really directly do that as neither your web page or web browser can directly interact with a Mobile App installed on a mobile phone.

having said that, you can try to do this:

Once your link in the web page is clicked, it send a http request to a backend service to log your request into a centre repository (backend database).
Then in your actual Mobile App, it got a backend listener to send http request to backend service to see if there's any new request. If there is, launch your Mobile App or do some action based on your http request that sent via web page.

I saw this being done from my local banks
Eoin OSullivanConsultantCommented:
You're referring to a Universal Link (iOS) or DeepLink (Android) and there are ways to achieve it.

This website service explains it very well - https://deeplink.me/what-is-deep-linking
And this covers it a bit more from a developer basis
https://developers.tune.com/sdk/deep-linking-to-your-mobile-app-from-your-website/

You can do it all yourself but services like Deeplink can make it simpler.
tommelkonianAuthor Commented:
Thanks for those useful links! All I need to do is link to the app (not a specific page within the app).  

Reading this part:
"Most apps can handle a simple link structure that looks a lot like a web URL. For example, if you have the Facebook app on your iOS device, open Safari and type fb:// into the address bar, and then press “Go.” The Facebook app will open right up. That’s because apps have a unique local address. On iOS, this is a URL Scheme that is declared in your app’s info.plist file."

 - makes me think (at least for IOS) that I could do this pretty simply, if I can find (or declare) our app's unique local address (while still providing a fallback for users that don't have the app). I wonder if this same thing is possible in android OS.

BUT... I also see in the comments on the other link, that iOS 9.2 is deprecating the custom URL schemes. So, "Universal Links" is the way to go (at least for iOS). Still a bit confused

Thanks very much for all the info! Much appreciated.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.