if (isMobile.Android())
{
var method = 'iframe';
var fallbackFunction = function()
{
if (method != 'intent')
/* The following code links to CandyCrush app for representation purpose only.
* You must provide the link to your mobile app. */
window.location = "https://play.google.com/store/apps/details?id=com.king.candycrushsaga";
};
var addIFrame = function()
{
var iframe = document.createElement("iframe");
iframe.style.border = "none";
iframe.style.width = "1px";
iframe.style.height = "1px";
/* The following variable must be changed to identify your respective URL scheme
* of your application. */
iframe.src = "ctmodelhouse://canvas";
document.body.appendChild(iframe);
};
if (navigator.userAgent.match(/Firefox/))
{
window.location = "ctmodelhouse://canvas";
/* Load app via direct deep link. For Android, the URL must have host
* and scheme (i.e. "ctmodelhouse://canvas") while other platforms,
* the scheme "ctmodelhouse://" is enough. */
}
else
{
addIFrame();
}
setTimeout(fallbackFunction, 750);
} |