application crashes when it try to create a http connection when the phone is connected with Limited WIFI connection, can anyone tell me how to check the internet is working or not in WIFI. sorry for my poor english.
FATAL EXCEPTION: main
Process: com.bytemachine.aditya.vehicletracker, PID: 3626
java.lang.NullPointerException: Attempt to invoke interface method 'org.apache.http.HttpEntity org.apache.http.HttpResponse.getEntity()' on a null object reference
at com.bytemachine.aditya.vehicletracker.SearchScreen$SetConnectionForVehicleSearch.onPostExecute(SearchScreen.java:561)
at com.bytemachine.aditya.vehicletracker.SearchScreen$SetConnectionForVehicleSearch.onPostExecute(SearchScreen.java:504)
at android.os.AsyncTask.finish(AsyncTask.java:636)
at android.os.AsyncTask.access$500(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)