I need to implement a feature where I can open either a web page or the app from an email account.
For Example: I have an app in which whenever I view any user's profile, the user receives an email. The mail contains a button "See Profile", the functionality for that button is whenever the button is tapped, it should open a mobile friendly site.
Now, my client requires that if the app is already installed, then tapping the button should open the associated app and it should navigate to the profile.
Also, if the user opens his email on a desktop, then a web site should be opened on tapping the button.
On mobile side, I think this could be done by URL scheme, but how to associate the same button for 2 different functionalities.
Instagram is already doing it.
Please help!