mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-31 18:47:21 +08:00
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.
This commit is contained in:
parent
7caab2543a
commit
82fed3f0b5
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user