Quantcast
Channel: HTML5
Viewing all articles
Browse latest Browse all 663

Problems with internet connection test

$
0
0

Hi everyone,

I'm using Intel XDK to create an app, but i'm with a problem, i think isn't so hard to solve but i expended all my saturday and i couldn't solve.

Here is the javascript

function testConnection()
{
   intel.xdk.device.updateConnection();
   document.getElementById("Desc").innerHTML = intel.xdk.device.connection;
}

Here is the html

<!DOCTYPE html>

<html><head><title>Blank HTML</title><meta http-equiv="Content-type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"><script src="intelxdk.js"></script><script src="cordova.js"></script><script src="xhr.js"></script><script src="js/init-app.js"></script><script src="js/app.js"></script><link rel="stylesheet" href="css/app.css"></head><body><h3>internet test?</h3><p class="align-center"><input class="button" type="button" id="bt_BuscaConect" value="connection" onclick="testConnection()"/></p><p id="Desc">test</p></body></html>

I just want to change the text when i click the button and show the connection, this code works when i'm emulating and when i'm debugging in my tablet Nexus 7, but doesn't work when i create the APK and install in my nexus. My android version is 5.0.2. I tried to use all cordova plugins, and still doesn't work.

 


Viewing all articles
Browse latest Browse all 663


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>