diff --git a/framework/src/com/phonegap/NetworkManager.java b/framework/src/com/phonegap/NetworkManager.java index 2925c69c..c04c312f 100644 --- a/framework/src/com/phonegap/NetworkManager.java +++ b/framework/src/com/phonegap/NetworkManager.java @@ -32,8 +32,13 @@ public class NetworkManager { public boolean isWifiActive() { NetworkInfo info = sockMan.getActiveNetworkInfo(); - String type = info.getTypeName(); - return type.equals("WIFI"); + if(info != null) + { + String type = info.getTypeName(); + return type.equals("WIFI"); + } + else + return false; } public boolean isReachable(String uri)