app_test
using app: URI scheme to open apps from web
by fezec
HTML
<!-- implement javascript on web page that first tries to open the deeplink 1. if user has app installed, then they would be redirected to open the app to specified screen 2. if user doesn't have app installed, then their mobile browser wouldn't recognize the URL scheme and app wouldn't open since it's not installed. In 1 second (1000 milliseconds) user is redirected to download app from app store. -->
<!-- button to Download App for new app users -->
<form action="http://hastrk.com/serve?action=click&publisher_id=1&site_id=2" target="_blank">
<input type="submit" value="Download" />
</form>
<!-- button to Open App to specific screen for existing app users -->
<form action="skype://echo123?call" target="_blank">
<input type="submit" value="Open App" />
</form>
CSS
@media screen and (max-device-width:480px) {
body {
-webkit-text-size-adjust:none
}
}
JavaScript
window.onload=function() {
alert("hi")
<!-- Deeplink URL for existing users with app already installed on their device -->
window.location = 'skype:echo123?call';
<!-- Downlaod URL (MAT link) for new users to download the app -->
setTimeout("window.location = 'https://play.google.com/store/apps/details?id=com.skype.raider&hl=en';", 1000);
}