hampusohlsson / browser-deeplink

Redirect mobile website users to your native iOS and/or Android app
MIT License
493 stars 173 forks source link

Android and ios always leads to opening the Play Store #22

Open umar28dec opened 7 years ago

umar28dec commented 7 years ago

Android and ios always open into the app store even app is installed <--! library file ->

<button type="button" class="view"><a href="javascript:void(0)" data-uri="myapp://example.com" onclick="openApp(this.dataset.uri)"> view</a></button>

<script>
 deeplink.setup({
    iOS: {
        appName: "App name",
        appId: "app_id",
    },
    android: {
        appId: "app id"
    }
});

    function openApp(url){
    deeplink.open(url);    
    return false;
}

</script>
alanandrade commented 6 years ago

é possível alterar no arquivo js, alterando a var baseurl, para o link desejado, e inserindo na function de abertura.