<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>tópico I downloaded the plugin and na Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093925#M66254</link>
    <description>&lt;P&gt;I downloaded the plugin and tried to add your code at the bottom on my index.html and stopped both my Wifi and 3G, no warnings are showing.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2016 12:49:18 GMT</pubDate>
    <dc:creator>ben4</dc:creator>
    <dc:date>2016-09-27T12:49:18Z</dc:date>
    <item>
      <title>Check network before open sub page</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093922#M66251</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I would like to know if there is a way to warn the user that their device should be connected to the internet before loading a sub page please.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Ben&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 09:27:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093922#M66251</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T09:27:44Z</dc:date>
    </item>
    <item>
      <title>Ben,</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093923#M66252</link>
      <description>&lt;P&gt;Ben,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;You can use Network Information plugin to do this.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Using this, you can check any time calling a function like this:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;function checkConnection() {
    var estadoInternet = navigator.connection.type;
    if (estadoInternet == "none" || estadoInternet == "unknown") {
        navigator.notification.beep(2);
        myApp.showPreloader("Para executar esta função é preciso ter conexão com a internet.");
        setTimeout(function () {
            myApp.hidePreloader();
        }, 2000);
        return false;
    } else {
        return true;
    }
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hamilton&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 11:24:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093923#M66252</guid>
      <dc:creator>Hamilton_Tenório_da_</dc:creator>
      <dc:date>2016-09-27T11:24:53Z</dc:date>
    </item>
    <item>
      <title>Thank you Hamilton!,</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093924#M66253</link>
      <description>&lt;P&gt;Thank you Hamilton!,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Let me try now and see how it works..&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 12:17:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093924#M66253</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T12:17:20Z</dc:date>
    </item>
    <item>
      <title>I downloaded the plugin and</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093925#M66254</link>
      <description>&lt;P&gt;I downloaded the plugin and tried to add your code at the bottom on my index.html and stopped both my Wifi and 3G, no warnings are showing.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 12:49:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093925#M66254</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T12:49:18Z</dc:date>
    </item>
    <item>
      <title>ok I am going to try with</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093926#M66255</link>
      <description>&lt;P&gt;ok I am going to try with this new code, awaiting for a build to generate...&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;But it seems that after the 2.30 version the API code has changed to this:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;DIV class="line" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-stretch: inherit; font-size: 16px; line-height: inherit; font-family: monospace, sans-serif; vertical-align: baseline; color: rgb(0, 0, 0); letter-spacing: -0.48px; white-space: pre; background-color: rgb(240, 240, 240);"&gt;
	&lt;PRE class="brush:;"&gt;function checkConnection() {
    var networkState = navigator.connection.type;
 
    var states = {};
    states[Connection.UNKNOWN]  = 'Unknown connection';
    states[Connection.ETHERNET] = 'Ethernet connection';
    states[Connection.WIFI]     = 'WiFi connection';
    states[Connection.CELL_2G]  = 'Cell 2G connection';
    states[Connection.CELL_3G]  = 'Cell 3G connection';
    states[Connection.CELL_4G]  = 'Cell 4G connection';
    states[Connection.CELL]     = 'Cell generic connection';
    states[Connection.NONE]     = 'No network connection';
 
    alert('Connection type: ' + states[networkState]);
}
 
checkConnection();&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Sep 2016 12:53:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093926#M66255</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T12:53:06Z</dc:date>
    </item>
    <item>
      <title>I added the above code at the</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093927#M66256</link>
      <description>&lt;P&gt;ok here is the right integration steps for it to work and it works very well!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://cordova.apache.org/docs/en/2.8.0/cordova/connection/connection.type.html" target="_blank"&gt;https://cordova.apache.org/docs/en/2.8.0/cordova/connection/connection.type.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093927#M66256</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T13:20:00Z</dc:date>
    </item>
    <item>
      <title>Ben,</title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093928#M66257</link>
      <description>&lt;P&gt;Ben,&lt;/P&gt;

&lt;P&gt;I adapted the code to know only if there is connection. That´s why I check only none or unkown.&lt;/P&gt;

&lt;P&gt;To work, I put my code inside this:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;if (checkConnection()) {
        // do something
    }&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:23:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093928#M66257</guid>
      <dc:creator>Hamilton_Tenório_da_</dc:creator>
      <dc:date>2016-09-27T14:23:09Z</dc:date>
    </item>
    <item>
      <title>Thanks:-)
 
 </title>
      <link>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093929#M66258</link>
      <description>&lt;P&gt;Thanks:-)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 16:08:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Check-network-before-open-sub-page/m-p/1093929#M66258</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-27T16:08:25Z</dc:date>
    </item>
  </channel>
</rss>

