Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11300

Undetected 4g connection in cordova network information plugin

    XMLWordPrintableJSON

    Details

      Description

      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; }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alsorokin Alexander Sorokin
                Reporter:
                scalvo Santi Calvo
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified