I am creating an app using PhoneGap for Android, iPhone and Windows Phone. I have to send a mon URL in phone by SMS, so is it possible to open the native app store in the phone through a mon link?
Like if someone have iPhone then after clicking on that link the app store will show that app to download.
I am creating an app using PhoneGap for Android, iPhone and Windows Phone. I have to send a mon URL in phone by SMS, so is it possible to open the native app store in the phone through a mon link?
Like if someone have iPhone then after clicking on that link the app store will show that app to download.
Share Improve this question edited Aug 10, 2016 at 8:23 Phonolog 6,5313 gold badges39 silver badges65 bronze badges asked Aug 9, 2016 at 21:37 Tusshar KumarTusshar Kumar 511 silver badge2 bronze badges1 Answer
Reset to default 4You could detect which OS the client is using and then proceed to load the correspondent URL. As Govind Singh Nagarkoti suggests in this post ( redirect to appstore or google play ) you could do something like this:
<script>
$(document).ready(function (){
if(navigator.userAgent.toLowerCase().indexOf("android") > -1){
window.location.href = 'http://play.google./store/apps/details?id=PACKAGEURL';
}
if(navigator.userAgent.toLowerCase().indexOf("iphone") > -1){
window.location.href = 'http://itunes.apple./lb/app/PACKAGEURL';
}
});
</script>