cancel
Showing results for 
Search instead for 
Did you mean: 

How to Minimize Apache Cordova App loading time

Former Member
0 Kudos

I am new to Cordova apps,Right now I am developing an app on SAPUI5 using cordova, When I run it on android its taking 7-8 seconds to load,I tried minify css and js but it didn't help.Here is my HTML code.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE HTML>
<html>
  <head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

  <script src="resources/sap-ui-core.js"
  id="sap-ui-bootstrap"
  data-sap-ui-libs="sap.m"
  data-sap-ui-theme="sap_bluecrystal">
  </script>
  <!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

  <link rel="stylesheet" type="text/css" href="Style/myCSS.css">

  <script>
  var user = "xxxx";
  var pass = "xxxx";
  var gatewayLoginLink = "proxy/http/xxxxxx/sap/opu/odata/sap/xxxxx";
  sap.ui.getCore().setModel(new sap.ui.model.odata.ODataModel( gatewayLoginLink, true, user, pass));

  </script>


  <script>
  sap.ui.localResources("qrcode");
  var app = new sap.m.App({initialPage:"idqrcode1"});
  var page = sap.ui.view({id:"idqrcode1", viewName:"qrcode.qrcode", type:sap.ui.core.mvc.ViewType.XML});
  app.addPage(page);
  app.placeAt("content");
  </script> 
  <script type="text/javascript" src="cordova.js"></script>

  </head>
  <body class="sapUiBody" role="application">
  <div id="content"></div>
  </body>
</html>


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


How can I minimize it to 2-3 seconds.Please help.


Accepted Solutions (0)

Answers (1)

Answers (1)

jbm1991
Explorer
0 Kudos

Hi Vinayak,

I recommend that you use the WEBIDE to generate a preload file for your application code which will speed things up slightly.

Have you checked the response times from your server to see if it is causing the delay? You can check this by debugging your android app in chrome on your PC and checking the network tab

Thanks

John