admin管理员组文章数量:1023827
) We have in app for android and iphone. When someone visits are website using their mobile phone, we want i popup that says.. Hi we have an app, want to download it? or whatever ;-) When selected yes, it has to download the app.
But i only want the popup to display when the app is not yet installed... So far i found this code.. As you can see, this wont work.. If anyone could help me out! Would be great!
<script type="text/javascript">
if( /Android|iPhone|BlackBerry/i.test(navigator.userAgent) ) {
var url=confirm("Would you like to download our mobile application?");
if (url==true)
{
var url = window.location.href = '? id=.appmachine.p9890BH';
url.show();
}
else
{
}
}
</script>
) We have in app for android and iphone. When someone visits are website using their mobile phone, we want i popup that says.. Hi we have an app, want to download it? or whatever ;-) When selected yes, it has to download the app.
But i only want the popup to display when the app is not yet installed... So far i found this code.. As you can see, this wont work.. If anyone could help me out! Would be great!
<script type="text/javascript">
if( /Android|iPhone|BlackBerry/i.test(navigator.userAgent) ) {
var url=confirm("Would you like to download our mobile application?");
if (url==true)
{
var url = window.location.href = 'https://play.google./store/apps/details? id=.appmachine.p9890BH';
url.show();
}
else
{
}
}
</script>
Share
Improve this question
asked Jan 3, 2014 at 15:28
GiancarloGiancarlo
311 silver badge3 bronze badges
2
- You want a web page to be able to read what apps a user has installed? Really? Do you think this might be a security/privacy problem? I don't know iOS, but on Android, this is not possible. – Simon Commented Jan 3, 2014 at 15:36
- Hi Simon, thanks for that insight. If that is a problem, we need the code without that bit. So only if android, it should show download popup for play store, and for iphone a dwonload for itunes. – Giancarlo Commented Jan 3, 2014 at 15:43
1 Answer
Reset to default 4For the iPhone, promoting your app while checking for its existence is possible with Apple's smart app banner, here are the docs.
This is limited to Apple and Safari, but it's a good starting spot.
Otherwise, I used this library and it has worked pretty well out of the box for me so far..
) We have in app for android and iphone. When someone visits are website using their mobile phone, we want i popup that says.. Hi we have an app, want to download it? or whatever ;-) When selected yes, it has to download the app.
But i only want the popup to display when the app is not yet installed... So far i found this code.. As you can see, this wont work.. If anyone could help me out! Would be great!
<script type="text/javascript">
if( /Android|iPhone|BlackBerry/i.test(navigator.userAgent) ) {
var url=confirm("Would you like to download our mobile application?");
if (url==true)
{
var url = window.location.href = '? id=.appmachine.p9890BH';
url.show();
}
else
{
}
}
</script>
) We have in app for android and iphone. When someone visits are website using their mobile phone, we want i popup that says.. Hi we have an app, want to download it? or whatever ;-) When selected yes, it has to download the app.
But i only want the popup to display when the app is not yet installed... So far i found this code.. As you can see, this wont work.. If anyone could help me out! Would be great!
<script type="text/javascript">
if( /Android|iPhone|BlackBerry/i.test(navigator.userAgent) ) {
var url=confirm("Would you like to download our mobile application?");
if (url==true)
{
var url = window.location.href = 'https://play.google./store/apps/details? id=.appmachine.p9890BH';
url.show();
}
else
{
}
}
</script>
Share
Improve this question
asked Jan 3, 2014 at 15:28
GiancarloGiancarlo
311 silver badge3 bronze badges
2
- You want a web page to be able to read what apps a user has installed? Really? Do you think this might be a security/privacy problem? I don't know iOS, but on Android, this is not possible. – Simon Commented Jan 3, 2014 at 15:36
- Hi Simon, thanks for that insight. If that is a problem, we need the code without that bit. So only if android, it should show download popup for play store, and for iphone a dwonload for itunes. – Giancarlo Commented Jan 3, 2014 at 15:43
1 Answer
Reset to default 4For the iPhone, promoting your app while checking for its existence is possible with Apple's smart app banner, here are the docs.
This is limited to Apple and Safari, but it's a good starting spot.
Otherwise, I used this library and it has worked pretty well out of the box for me so far..
本文标签: javascriptPopup for android or iphone tot download app when visiting siteStack Overflow
版权声明:本文标题:javascript - Popup for android or iphone tot download app when visiting site - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745518634a2154208.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论