Layar: Opening App Store from Layar HTML Widget in JavaScript or JQuery

204 Views Asked by At

I'm unsing a HTML widget in Layar which has to control all the interaction. So no Layar buttons. I trying to use a simple JavaScript / JQuery function to open a target app in the App Store:

$('.btn-download').click(function(){
    window.location.href = "itms://itunes.com/apps/someApp";
});

I do something simular opening a mail window with mailto: which works fine. Somehow this will do nothing. B.t.w. It only has to work on iOS.

1

There are 1 best solutions below

1
On

Try using this:

setTimeout(function() {
  window.location = "http://itunes.com/apps/someApp";
}, 25);

window.location = "custom-uri://";

Copied this from: Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?