From 94ff1ea3ef279fb0de4986c0e3597e7c2b919d32 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 6 Sep 2016 10:32:22 +0530 Subject: [PATCH] Fixing android agent download issue --- .../download-agent.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js index 45dbdad72..c6dc94c70 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/emm-web-agent/app/pages/mdm.page.enrollments.android.download-agent/download-agent.js @@ -21,9 +21,11 @@ function onRequest(context) { var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var viewModel = {}; - + // setting android agent download URL - viewModel.agentDownloadURL = context.page.publicUri + "/asset/" + mdmProps["androidAgentApp"]; + // Needs host=>http:9763 since self-signed certificates won't allow downloads in android + //TODO: try to retrieve page name from UUF + viewModel.agentDownloadURL = mdmProps["generalConfig"]["host"] + mdmProps["appContext"] + "public/mdm.page.enrollments.android.agent.download/asset/" + mdmProps["androidAgentApp"]; var companyProps = session.get("COMPANY_DETAILS"); if (!companyProps) { viewModel.companyName = mdmProps.generalConfig.companyName;