Santi Calvo created CB-11300:
--------------------------------
Summary: Undetected 4g connection in cordova network information
plugin
Key: CB-11300
URL: https://issues.apache.org/jira/browse/CB-11300
Project: Apache Cordova
Issue Type: Bug
Components: Plugin Network Information
Environment: Android
Reporter: Santi Calvo
Priority: Minor
My device returns "4g" as subtypename when checking the connection.
The Java plugin, NeworkManager.java line 246, does the bellow check where the
string "4g" doesn't match any of the constants:
else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
type = info.getSubtypeName().toLowerCase(Locale.US);
if (type.equals(GSM) ||
type.equals(GPRS) ||
type.equals(EDGE)) {
return TYPE_2G;
}
else if (type.startsWith(CDMA) ||
type.equals(UMTS) ||
type.equals(ONEXRTT) ||
type.equals(EHRPD) ||
type.equals(HSUPA) ||
type.equals(HSDPA) ||
type.equals(HSPA)) {
return TYPE_3G;
}
else if (type.equals(LTE) ||
type.equals(UMB) ||
type.equals("4g") ||
type.equals(HSPA_PLUS)) {
return TYPE_4G;
}
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]