El rebote entre "El adaptador está separado" y "No hay conexión envuelta" con HttpClient
Entonces, como dije, estoy rebotando entre estos dos errores cuando intento correrHttpClient.execute(HttpPost)
. ConsiguiendoIllegalStateException
public class NetMethods {
private static HttpClient client = new DefaultHttpClient();
public static void getStuff() {
ArrayList<Alarm> alarms = new ArrayList<Alarm>();
HttpPost post = HttpPostFactory.getHttpPost("GetStuff");
StringBuilder builder = new StringBuilder();
HttpResponse response = client.execute(post); // Exception thrown here
...
Además, mi MttpPostFactory solo tiene esto
import org.apache.http.client.methods.HttpPost;
public class HttpPostFactory {
private static final String url = "http://example.com/ExampleFolder/";
public static HttpPost getHttpPost(String s) {
return new HttpPost(url + s);
}
}