How to detect if the user has the mobile application from a website and open the appHow do I detect a click outside an element?How do I remove a property from a JavaScript object?How do I debug Node.js applications?How do I get a YouTube video thumbnail from the YouTube API?How can I open a URL in Android's web browser from my application?What is the best way to detect a mobile device?How do I remove a particular element from an array in JavaScript?Detecting a mobile browserHow do I return the response from an asynchronous call?What is the list of possible values for navigator.platform as of today?

What does 松の木に吊るされた mean in this sentence?

Exception propagation: When should I catch exceptions?

What is Plautus’s pun about frustum and frustrum?

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

Meaning of "sib of 20" in a by-patient case description table

"Right on the tip of my tongue" meaning?

use the oversamplling followed by '' decimation method ''to increasee the ADC resolution and not normal averaging

How can I answer high-school writing prompts without sounding weird and fake?

Who was this character from the Tomb of Annihilation adventure before they became a monster?

Repair a file using Audacity?

How did Thanos not realise this had happened at the end of Endgame?

Why was Endgame Thanos so different than Infinity War Thanos?

Was this character’s old age look CGI or make-up?

How to slow yourself down (for playing nice with others)

Is there any evidence to support the claim that the United States was "suckered into WW1" by Zionists, made by Benjamin Freedman in his 1961 speech?

Word for being out at night during curfew

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

What does "Ich wusste, dass aus dir mal was wird" mean?

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

Ex-manager wants to stay in touch, I don't want to

What is the best way for a skeleton to impersonate human without using magic?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

How does Howard Stark know this?

Why doesn't Rocket Lab use a solid stage?



How to detect if the user has the mobile application from a website and open the app


How do I detect a click outside an element?How do I remove a property from a JavaScript object?How do I debug Node.js applications?How do I get a YouTube video thumbnail from the YouTube API?How can I open a URL in Android's web browser from my application?What is the best way to detect a mobile device?How do I remove a particular element from an array in JavaScript?Detecting a mobile browserHow do I return the response from an asynchronous call?What is the list of possible values for navigator.platform as of today?






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








0















My website is not mobile responsive, but i have a mobile app for both Android and iOS. When people visit my website using one of these two platforms, I would like to direct them to my mobile app.



If they already have my mobile app, I would like it to auto open that app, otherwise I'd like the person to be redirected to the Google Play store or Apple AppStore to download the mobile app.



I don't know how to do that. Please help me with tips on how to do this.



<?php
class UserInfo{

private static function get_user_agent()
return $_SERVER['HTTP_USER_AGENT'];


public static function get_os() mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);

foreach ($os_array as $regex => $value)
if (preg_match($regex, $user_agent))
$os_platform = $value;


return $os_platform;

?>









share|improve this question
























  • THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

    – Gabe Sechan
    Mar 23 at 12:06

















0















My website is not mobile responsive, but i have a mobile app for both Android and iOS. When people visit my website using one of these two platforms, I would like to direct them to my mobile app.



If they already have my mobile app, I would like it to auto open that app, otherwise I'd like the person to be redirected to the Google Play store or Apple AppStore to download the mobile app.



I don't know how to do that. Please help me with tips on how to do this.



<?php
class UserInfo{

private static function get_user_agent()
return $_SERVER['HTTP_USER_AGENT'];


public static function get_os() mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);

foreach ($os_array as $regex => $value)
if (preg_match($regex, $user_agent))
$os_platform = $value;


return $os_platform;

?>









share|improve this question
























  • THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

    – Gabe Sechan
    Mar 23 at 12:06













0












0








0


1






My website is not mobile responsive, but i have a mobile app for both Android and iOS. When people visit my website using one of these two platforms, I would like to direct them to my mobile app.



If they already have my mobile app, I would like it to auto open that app, otherwise I'd like the person to be redirected to the Google Play store or Apple AppStore to download the mobile app.



I don't know how to do that. Please help me with tips on how to do this.



<?php
class UserInfo{

private static function get_user_agent()
return $_SERVER['HTTP_USER_AGENT'];


public static function get_os() mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);

foreach ($os_array as $regex => $value)
if (preg_match($regex, $user_agent))
$os_platform = $value;


return $os_platform;

?>









share|improve this question
















My website is not mobile responsive, but i have a mobile app for both Android and iOS. When people visit my website using one of these two platforms, I would like to direct them to my mobile app.



If they already have my mobile app, I would like it to auto open that app, otherwise I'd like the person to be redirected to the Google Play store or Apple AppStore to download the mobile app.



I don't know how to do that. Please help me with tips on how to do this.



<?php
class UserInfo{

private static function get_user_agent()
return $_SERVER['HTTP_USER_AGENT'];


public static function get_os() mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);

foreach ($os_array as $regex => $value)
if (preg_match($regex, $user_agent))
$os_platform = $value;


return $os_platform;

?>






javascript php android jquery ios






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 14:56









Mike Hay

2,5591626




2,5591626










asked Mar 23 at 11:34









JeradJerad

829




829












  • THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

    – Gabe Sechan
    Mar 23 at 12:06

















  • THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

    – Gabe Sechan
    Mar 23 at 12:06
















THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

– Gabe Sechan
Mar 23 at 12:06





THere's services out there like branch.io that do this for you. I'd recommend using them, its actually somewhat difficult to do on your own.

– Gabe Sechan
Mar 23 at 12:06












1 Answer
1






active

oldest

votes


















2














On Android, you can use app links for your domain. On iOS, you have a similar technique, universal links. Set up these in your mobile apps and redirect a user to such deep link to open content inside your app. If the app is installed, it seizes that redirect and can continue to interact with the user. And if not, a web-page hosted on the link is opened.






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%2f55313309%2fhow-to-detect-if-the-user-has-the-mobile-application-from-a-website-and-open-the%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









    2














    On Android, you can use app links for your domain. On iOS, you have a similar technique, universal links. Set up these in your mobile apps and redirect a user to such deep link to open content inside your app. If the app is installed, it seizes that redirect and can continue to interact with the user. And if not, a web-page hosted on the link is opened.






    share|improve this answer



























      2














      On Android, you can use app links for your domain. On iOS, you have a similar technique, universal links. Set up these in your mobile apps and redirect a user to such deep link to open content inside your app. If the app is installed, it seizes that redirect and can continue to interact with the user. And if not, a web-page hosted on the link is opened.






      share|improve this answer

























        2












        2








        2







        On Android, you can use app links for your domain. On iOS, you have a similar technique, universal links. Set up these in your mobile apps and redirect a user to such deep link to open content inside your app. If the app is installed, it seizes that redirect and can continue to interact with the user. And if not, a web-page hosted on the link is opened.






        share|improve this answer













        On Android, you can use app links for your domain. On iOS, you have a similar technique, universal links. Set up these in your mobile apps and redirect a user to such deep link to open content inside your app. If the app is installed, it seizes that redirect and can continue to interact with the user. And if not, a web-page hosted on the link is opened.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 23 at 11:55









        mymediamymedia

        317119




        317119





























            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%2f55313309%2fhow-to-detect-if-the-user-has-the-mobile-application-from-a-website-and-open-the%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

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해