Thanks
@Erel , the question is how to make it global. We have an app that usually send administrators, an email with the requests that needs their attention.
How can we make the URL link globally registered on a single URI for iOS and Android.
Android needs a plain url as
https://app.yourdomain.com/path
iOS needs a plain protocol app.yourdomain.com//path
I have looked up the timeout solution for iOS, but I cannot figure out how to solve it for Android, because if you force the window.location to the URLScheme, it goes on the browser to the web page. If I use window.open it works, but usually this is blocked on most browsers.
If users land on a common url which exists on a web server, I can do the following
<a href="//app.llavemovil.com" id="Link">Testing...hhh</a>
<script>
var userAgent = navigator.userAgent || navigator.vendor || window.opera
userAgent=userAgent.toLowerCase();
$(function(){
setTimeout(function() {
//alert("TEST")
//window.location = "http://itunes.com/apps/yourappname";
}, 100);
var URI=""
if(userAgent.indexOf("iphone")>=0){
//window.open("app.llavemovil.com://test")
URI="app.llavemovil.com://test"
}else if(userAgent.indexOf("android")>=0){
URI="https://app.llavemovil.com"
//window.open("https//app.llavemovil.com")
}
if(URI!=''){
$("#Link").attr("href", URI).text(URI)
}
});
</script>
THe timeout function as I said before it works with iOS, but I have not found a way to achieve the same result with Android. Even with a jQuery forced click wont work either $("#Link").click()