[
https://issues.apache.org/jira/browse/CB-11300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Sorokin closed CB-11300.
----------------------------------
Resolution: Fixed
> 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
> Assignee: Alexander Sorokin
> Priority: Minor
> Labels: android, easyfix, network-information,
> network.connection, triaged
> Attachments: Captura de pantalla 2016-05-20 a las 9.29.14 (2).png
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> My device returns "4g" as subtypename when checking the connection. Since
> this string is not found the plugin returns "unknow" 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]