How to launch an android app from website





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have an android application, which I want to launch from the website.



Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.



I used this code in my website:



<a href="myapp://link">Click me</a>


It is working fine.



Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.



As well as this code:



<a href="myapp://link">Click me</a> 


is not working if I put this into a function like:



launchApp:function(){
$window.location.href='myapp://link';
}


this is not working.



How do I fix these issues?










share|improve this question

























  • Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

    – deathangel908
    Jan 4 at 8:07











  • read this stackoverflow.com/questions/31404341/…

    – Mohit Saxena
    Jan 4 at 8:22











  • are you using an emulator for testing?

    – Marco
    Jan 4 at 8:44











  • <a href="myapp://link">Click me</a> work, but not when I put his into function

    – Pranay
    Jan 4 at 9:10


















0















I have an android application, which I want to launch from the website.



Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.



I used this code in my website:



<a href="myapp://link">Click me</a>


It is working fine.



Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.



As well as this code:



<a href="myapp://link">Click me</a> 


is not working if I put this into a function like:



launchApp:function(){
$window.location.href='myapp://link';
}


this is not working.



How do I fix these issues?










share|improve this question

























  • Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

    – deathangel908
    Jan 4 at 8:07











  • read this stackoverflow.com/questions/31404341/…

    – Mohit Saxena
    Jan 4 at 8:22











  • are you using an emulator for testing?

    – Marco
    Jan 4 at 8:44











  • <a href="myapp://link">Click me</a> work, but not when I put his into function

    – Pranay
    Jan 4 at 9:10














0












0








0








I have an android application, which I want to launch from the website.



Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.



I used this code in my website:



<a href="myapp://link">Click me</a>


It is working fine.



Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.



As well as this code:



<a href="myapp://link">Click me</a> 


is not working if I put this into a function like:



launchApp:function(){
$window.location.href='myapp://link';
}


this is not working.



How do I fix these issues?










share|improve this question
















I have an android application, which I want to launch from the website.



Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.



I used this code in my website:



<a href="myapp://link">Click me</a>


It is working fine.



Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.



As well as this code:



<a href="myapp://link">Click me</a> 


is not working if I put this into a function like:



launchApp:function(){
$window.location.href='myapp://link';
}


this is not working.



How do I fix these issues?







javascript android angularjs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 9:03









Naina

2,36963043




2,36963043










asked Jan 4 at 8:03









PranayPranay

1




1













  • Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

    – deathangel908
    Jan 4 at 8:07











  • read this stackoverflow.com/questions/31404341/…

    – Mohit Saxena
    Jan 4 at 8:22











  • are you using an emulator for testing?

    – Marco
    Jan 4 at 8:44











  • <a href="myapp://link">Click me</a> work, but not when I put his into function

    – Pranay
    Jan 4 at 9:10



















  • Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

    – deathangel908
    Jan 4 at 8:07











  • read this stackoverflow.com/questions/31404341/…

    – Mohit Saxena
    Jan 4 at 8:22











  • are you using an emulator for testing?

    – Marco
    Jan 4 at 8:44











  • <a href="myapp://link">Click me</a> work, but not when I put his into function

    – Pranay
    Jan 4 at 9:10

















Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

– deathangel908
Jan 4 at 8:07





Does <a href="myapp://link">Click me</a> work or not? You just said it twice that it works and then that it doesn't

– deathangel908
Jan 4 at 8:07













read this stackoverflow.com/questions/31404341/…

– Mohit Saxena
Jan 4 at 8:22





read this stackoverflow.com/questions/31404341/…

– Mohit Saxena
Jan 4 at 8:22













are you using an emulator for testing?

– Marco
Jan 4 at 8:44





are you using an emulator for testing?

– Marco
Jan 4 at 8:44













<a href="myapp://link">Click me</a> work, but not when I put his into function

– Pranay
Jan 4 at 9:10





<a href="myapp://link">Click me</a> work, but not when I put his into function

– Pranay
Jan 4 at 9:10












1 Answer
1






active

oldest

votes


















0














Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54035116%2fhow-to-launch-an-android-app-from-website%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995






    share|improve this answer




























      0














      Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995






      share|improve this answer


























        0












        0








        0







        Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995






        share|improve this answer













        Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 4 at 8:30









        P Sandesh BaligaP Sandesh Baliga

        14918




        14918
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54035116%2fhow-to-launch-an-android-app-from-website%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas