cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11300) Undetected 4g connection in cordova network information plugin
Date Mon, 08 Aug 2016 09:28:20 GMT

    [ https://issues.apache.org/jira/browse/CB-11300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411585#comment-15411585
] 

ASF GitHub Bot commented on CB-11300:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-network-information/pull/46


> 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message