I am using a custom url to trigger an app in mobile devices. The custom Url wont work if the app doesn't exist. In that case i have to redirect it to alternate url.
i have tried using below timout method in js.
var alternate = function() {
window.location=alternateUrl;
}
setTimeout(alternate , 25);
window.location = customUrl;
note: this works fine in ios but not in android.
Other techniques which i used are ajax request and xml http request.(both coudnt not be used for cross domain requests.)
i have tried using yahoo Api but even that coulnt be used for checking app in mobile using custom url.
Is there any way to find out whether my app exists using custom url schema and redirecting to alternate url if not exists?