Organizational Research By

Surprising Reserch Topic

check if url scheme is supported in javascript


check if url scheme is supported in javascript  using -'javascript,iphone,safari,url-scheme'
asked Sep 14, 2015 by CheriHawthor
0 votes
4 views



Related Hot Questions



Government Jobs Opening

Open Google with Chrome
answered Sep 14, 2015 by EmelyGarnett
0 votes

Starting from iOS 6.0 Apple presented the Smart App Banners which do what most of us are looking for:

  • Send to App Store if the app isn't installed.
  • Open the App with a specific deep link, using the app-argument param.

Include the following meta tag:


taken from here: Safari Web Content Guide

answered Sep 14, 2015 by EpifaniaWink
0 votes

I try to use just the 'pagehide' event, but then it not work into Firefox. I created this version here http://jsfiddle.net/thiagomata/6tvoc4f1/2/ what works in Firefox, Google Chrome and Safari. I have not tested in Internet Explorer yet.

One thing what was necessary to make it work into Firefox, was use Iframe to set the src. This allows me to call the app without leaving my page.

http://www.google.com?q=not-found-link"
  >
  Example 1
​
http://www.google.com?q=not-found-link"
  data-url-app-found="http://www.google.com?q=found-link"
  >
  Example 2
​
http://www.google.com?q=not-exists"
>
  Example 3
​

answered Sep 14, 2015 by RickyPrichar
0 votes

This is based on the answer of mrahman. As noted, by JoshNaro new Date() gives back a wrong date when called inside the timeout. Tests suggest that the date is not updated in threads that are started before the app is deactivated.

A further ugly setTimeout called after activation will create a new thread with the current date.

This was tested on iOS 8.

function startiThrown() {
    document.location = appurl;
    var time = (new Date()).getTime();
    setTimeout(function(){
        setTimeout(function(){ // <-- start new thread after activation
            var now = (new Date()).getTime();
            if((now - time)<400) {
                if(confirm('You do not seem to have iThrown installed, do you want to go download it now?')){
                    document.location = 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293049283&mt=8&uo=6';
                }
            }
        }, 10; // <-- start new thread after activation
    }, 300);
}
answered Sep 14, 2015 by MirPawlowsk
0 votes

I have this comment a/18715513/49114 with a jQuery plugin to add alternative app link to regular links.

Regards, Lito.

answered Sep 14, 2015 by TDMMayradgbc

...