-3

Is there any way, through the html/css (email) code, to only put one link that identifies the device (i.e. desktop, Android, iOS) and depending on platform the user is on direct him to web-site or to the mobile app (Android, iOS).

diagram

enter image description here

smyslov
  • 1,279
  • 1
  • 8
  • 29
Mykola
  • 1
  • Welcome to Stack Overflow. Please review [How do I ask a good question](https://stackoverflow.com/help/how-to-ask). What have you already tried yourself to find the problem? Questions should show **evidence of research and attempts to solve the problem yourself**, a clear outline of your specific coding-related issue, and any relevant code in a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve), so we have enough information to be able to help. – FluffyKitten Oct 13 '17 at 08:17
  • [https://branch.io/app-store-urls](https://branch.io/app-store-urls) should create links for you that does all of that handling for you. You won't be able to open up the app unless you register it to handle deep linking. I suggest you implement [Branch](https://branch.io) to allow your app to handle deep linking. – clayjones94 Oct 13 '17 at 15:54
  • If the task of re-directing user is not the primary purpose of your product, consider third party solutions that will do this for you. I am working in [Firebase Dynamic Links](https://firebase.google.com/docs/dynamic-links/) team. Firebase Dynamic Links support all use cases you describing on the diagram. – Oleksiy Ivanov Oct 16 '17 at 19:56
  • Guys, thanks a lot. Your comments have been very helpful. – Mykola Oct 18 '17 at 13:07

1 Answers1

0

You can find out the OS details using Javascript

oscpuInfo = window.navigator.oscpu will store this info into a string

function osInfo() { 
  alert(window.navigator.oscpu); 
}
// example result is: "Windows NT 6.0" 

see How to redirect to another webpage? for a nice answer on redirection by simulating an HTTP redirect

Oscar Chambers
  • 899
  • 9
  • 25