From 82fed3f0b53ebbd76ae77e20310c4e8ee9fa36f2 Mon Sep 17 00:00:00 2001 From: VinuL Date: Thu, 27 Aug 2015 13:04:32 +0100 Subject: [PATCH] Update NetworkManager.java I tried to use Ethernet link to my Android tablet using this cable http://www.amazon.co.uk/Smays-Micro-USB-Ethernet-Computer-Notebook/dp/B009XU6N54 I noticed my app returned Network = None. So I added this little patch so the app now works over Ethernet link. --- src/android/NetworkManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/android/NetworkManager.java b/src/android/NetworkManager.java index ac0faae..19443f0 100755 --- a/src/android/NetworkManager.java +++ b/src/android/NetworkManager.java @@ -45,6 +45,7 @@ public class NetworkManager extends CordovaPlugin { public static final String WIFI = "wifi"; public static final String WIMAX = "wimax"; + public static final String ETHERNET = "ethernet"; // mobile public static final String MOBILE = "mobile"; @@ -240,6 +241,9 @@ public class NetworkManager extends CordovaPlugin { if (type.equals(WIFI)) { return TYPE_WIFI; } + else if (type.toLowerCase().equals(ETHERNET)) { + return TYPE_ETHERNET; + } else if (type.equals(MOBILE) || type.equals(CELLULAR)) { type = info.getSubtypeName(); if (type.equals(GSM) ||