diff --git a/framework/src/com/phonegap/NetworkManager.java b/framework/src/com/phonegap/NetworkManager.java index da8f1f1f..2925c69c 100644 --- a/framework/src/com/phonegap/NetworkManager.java +++ b/framework/src/com/phonegap/NetworkManager.java @@ -23,7 +23,9 @@ public class NetworkManager { public boolean isAvailable() { NetworkInfo info = sockMan.getActiveNetworkInfo(); - boolean conn = info.isConnected(); + boolean conn = false; + if(info != null) + conn = info.isConnected(); return conn; } diff --git a/framework/src/com/phonegap/PhoneGap.java b/framework/src/com/phonegap/PhoneGap.java index 1ee55019..f03a9dc2 100644 --- a/framework/src/com/phonegap/PhoneGap.java +++ b/framework/src/com/phonegap/PhoneGap.java @@ -114,7 +114,7 @@ public class PhoneGap{ return version; } - + public void httpGet(String url, String file) /** * grabs a file from specified url and saves it to a name and location