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;
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
add a comment |
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
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
add a comment |
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
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
javascript php
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 23 at 11:55
mymediamymedia
317119
317119
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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