diff --git a/app/src/assets/scripts/checkMobileDevice.js b/app/src/assets/scripts/checkMobileDevice.js index a81567e3a..ce3621440 100644 --- a/app/src/assets/scripts/checkMobileDevice.js +++ b/app/src/assets/scripts/checkMobileDevice.js @@ -1,19 +1,3 @@ - // const ua = navigator.userAgent.toLowerCase(); - // const isAndroid = ua.indexOf('android') > -1; - // const isIphone = ua.indexOf('iphone') > -1; - - // if (isIphone === true) { - // window.location.href = 'com.alfresco.contentapp://iosamw'; - // setTimeout(() => { - // console.log("iphone"); - // }, 25); - // } else if (isAndroid === true) { - // window.location.href = 'com.alfresco.content.app://androidamw'; - // setTimeout(() => { - // console.log("android"); - // }, 25); - // } - const ua = navigator.userAgent.toLowerCase(); const isAndroid = ua.indexOf("android") > -1; // android check const isIphone = ua.indexOf("iphone") > -1; // ios check @@ -29,9 +13,14 @@ }; app.launchApp(); } else if (isAndroid === true) { + let url = window.location.href; let app = { launchApp: function() { - window.location.href = "intent:#Intent;scheme=androidamw;package=com.alfresco.content.app;end"; //which page to open(now from mobile, check its authorization) + setTimeout((event) => { + window.location.href = "intent:#Intent;scheme=androidamw;package=com.alfresco.content.app.debug;end"; //which page to open(now from mobile, check its authorization) + console.log(event); + }, 500); + url; // setTimeout(this.openWebApp, 500); }, openWebApp: function() {