1

How can i open a Android app with a link from my Website. I need a link that open a Android App Browser like Samsung Browser. So if the user are on the website with chrome browser he click the link and move to Samsung Browser.

The link in the Website must be like <a Samsung_Browser://example.com/ /a>

bruno2000
  • 85
  • 1
  • 7

1 Answers1

0

I found some Example, but this one open the Google Maps. I need to open the Samsung Browser on Android.

<div class="maps-link">
<img style="cursor: pointer;" onclick="mapsSelector()" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/747/maps-icon.png" />
</div>

function mapsSelector() {
  if /* if we're on iOS, open in Apple Maps */
    ((navigator.platform.indexOf("iPhone") != -1) || 
     (navigator.platform.indexOf("iPod") != -1) || 
     (navigator.platform.indexOf("iPad") != -1))
    window.open("maps://maps.google.com/maps?daddr=lat,long&amp;ll=");

  else /* else use Google */
    window.open("https://maps.google.com/maps?daddr=lat,long&amp;ll=");
}
bruno2000
  • 85
  • 1
  • 7
  • You don't need to replace & with `&` when redirecting using JavaScript, this is only required when using the href attribute in an HTML document. – Ferrybig Mar 15 '19 at 17:16