Repository: cordova-plugin-network-information Updated Branches: refs/heads/master 3c9c2460b -> 37c0e3ff7
CB-7595: Android L changes the type from Mobile to Cellular, I'm pretty sure this isn't documented Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/37c0e3ff Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/37c0e3ff Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/37c0e3ff Branch: refs/heads/master Commit: 37c0e3ff75f512b769b85a666f9a875e017de78d Parents: 3c9c246 Author: Joe Bowser <[email protected]> Authored: Mon Sep 22 10:27:10 2014 -0700 Committer: Joe Bowser <[email protected]> Committed: Mon Sep 22 10:27:10 2014 -0700 ---------------------------------------------------------------------- src/android/NetworkManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/37c0e3ff/src/android/NetworkManager.java ---------------------------------------------------------------------- diff --git a/src/android/NetworkManager.java b/src/android/NetworkManager.java index aa4e161..1b2656e 100755 --- a/src/android/NetworkManager.java +++ b/src/android/NetworkManager.java @@ -45,6 +45,9 @@ public class NetworkManager extends CordovaPlugin { public static final String WIMAX = "wimax"; // mobile public static final String MOBILE = "mobile"; + + // Android L calls this Cellular, because I have no idea! + public static final String CELLULAR = "cellular"; // 2G network types public static final String GSM = "gsm"; public static final String GPRS = "gprs"; @@ -241,7 +244,7 @@ public class NetworkManager extends CordovaPlugin { if (type.toLowerCase().equals(WIFI)) { return TYPE_WIFI; } - else if (type.toLowerCase().equals(MOBILE)) { + else if (type.toLowerCase().equals(MOBILE) || type.toLowerCase().equals(CELLULAR)) { type = info.getSubtypeName(); if (type.toLowerCase().equals(GSM) || type.toLowerCase().equals(GPRS) ||
