title: My intel xdk project works when i emulate but no when i generate my apk
body: <p>I'm trying to create an app in intel xdk, i'm in the beggining, my code works when i'm emmulating or debugging, but when i generate the apk doesn't work. I just want for a while that when i click in an button my connection type appears down bellow, but this doesn't work in my real device when i install the apk.</p>
  
  <p>I tryied to install in an Nexus 7 with android 5.0.2 and in an Samsung Galaxy Ace with android 2.3.6</p>
  
  <p>here is an video that i made of my project with all permissions and plugins.
  <a href="https://www.youtube.com/watch?v=-95ybzobAtY&amp;feature=youtu.be" rel="nofollow">https://www.youtube.com/watch?v=-95ybzobAtY&amp;feature=youtu.be</a></p>
  
  <p>here is the html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Blank Hybrid App Project Template&lt;/title&gt;
  &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"&gt;
  &lt;style&gt;
      ev.w3.org/csswg/css-device-adapt/ */
      @-ms-viewport { width: 100vw ; zoom: 100% ; }                           @viewport { width: 100vw ; zoom: 100% ; }
      @-ms-viewport { user-zoom: fixed ; }                                    @viewport { user-zoom: fixed ; }
  &lt;/style&gt;
  &lt;link rel="stylesheet" href="css/app.css"&gt;
  &lt;/head&gt;
  
  
  &lt;body&gt;
  &lt;h1 class="align-center"&gt;A Blank Project Template&lt;/h1&gt;
  &lt;p class="align-center"&gt;
      To use this template as a starter app, start with init-app.js and app.js for your JavaScript code.
      See the README.md file for more details and the comments inside index.html, app.js and init-app.js.
  &lt;/p&gt;
  &lt;br&gt;
  &lt;p class="align-center"&gt;&lt;input type="button" id="id_btnHello" value="Touch Me"&gt;&lt;/p&gt;
  &lt;p class="align-center"&gt;&lt;input type="button" id="bt_test" value="Teste" onclick="conn()"&gt;&lt;/p&gt;
  &lt;p class="align-center" id="desc"&gt;testt&lt;/p&gt;
  &lt;script src="intelxdk.js"&gt;&lt;/script&gt;    
  &lt;script src="cordova.js"&gt;&lt;/script&gt;     
  &lt;script src="xhr.js"&gt;&lt;/script&gt;         
  
  &lt;script src="js/app.js"&gt;&lt;/script&gt;      
  &lt;script src="js/init-app.js"&gt;&lt;/script&gt; 
  
  &lt;script src="xdk/init-dev.js"&gt;&lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>here is the javascript</p>
  
  <pre><code>function myEventHandler() {
  "use strict" ;
  
  var ua = navigator.userAgent ;
  var str ;
  
  if( window.Cordova &amp;&amp; dev.isDeviceReady.c_cordova_ready__ ) {
          str = "It worked! Cordova device ready detected at " + dev.isDeviceReady.c_cordova_ready__ + " milliseconds!" ;
  }
  else if( window.intel &amp;&amp; intel.xdk &amp;&amp; dev.isDeviceReady.d_xdk_ready______ ) {
          str = "It worked! Intel XDK device ready detected at " + dev.isDeviceReady.d_xdk_ready______ + " milliseconds!" ;
  }
  else {
      str = "Bad device ready, or none available because we're running in a browser." ;
  }
  alert(str) ;
  }
  
  function conn()
  {
      document.getElementById('desc').innerHTML = intel.xdk.device.connection;
  }
  </code></pre>