public void postData(String url, String postData, Integer serviceId) throws MalformedURLException { if (connPost != null) { connPost.cancel(true); connPost = null; } this.serviceId = serviceId; connPost = new AsyncPostRequest(this); connPost.execute(url, postData); }
public void cancel() { if (conn != null) { conn.cancel(true); conn = null; } if (connPost != null) { connPost.cancel(true); connPost = null; } }