How to open the application when you visit the website?


#1

I am using the following plugin and I work pretty well but my question is, how can I make ny page in a directory will be in the application, in few words the user from google will be redirected to the application

https://github.com/EddyVerbruggen/Custom-URL-scheme

<a href="mycoolapp://">Open my app</a>
<a href="mycoolapp://somepath">Open my app</a>
<a href="mycoolapp://somepath?foo=bar">Open my app</a>
<a href="mycoolapp://?foo=bar">Open my app</a>

this works well but only if the user clicks the link, the idea is to be automatic when you open the page from the phone open in the app


#2

This might help.


#3

Nice plugin. Little bit off topic, but how can you be sure your website visitors already have your app installed?


#4

look for google app indexing, I think it help, sorry for my english


#5

To check whether an app is installed, you would do:

if (screen.width <= 699) {
    document.location = 'mycoolapp://';
    setTimeout(function(){
        alert('You do not have mycoolapp installed');
     }, 300);
}

If the screen width is less than 699, redirects to the app, after 300 ms, if the user has not redirected, do whatever.