(Sorry for any english mistake its not my native language)
I'm trying to parse html using Volley and Jsoup. while debugging / running the app, the StringRequest dosent invoke onResponse() or onErrorResponse(), basically there no response or Error from the Response.Listener (i guess). so i cant "begin" parsing the html because the onResponse() is never invoked. Ive searched for answer and nothing seems to get it fixed.
Could it be that the RequestQueue cache kicks in and its not trying to get the response? (just brain storming tried so many things).
--Im just trying to retrive data from html, so i could show the updated data from the url in my app, is Volly the way or should i use simpler mathods?
here is my volley StringRequest and RequestQueue:
String url = "http://www.fringeb7.co.il/";
final RequestQueue requestQueue = Volley.newRequestQueue(MainActivity.this);
// Request a string response from the provided URL.
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
response_utf8 = URLDecoder.decode(URLEncoder.encode(response, "iso8859-1"),"UTF-8");
doc = Jsoup.parse(response_utf8);
Log.d("logr=",response);
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
error.printStackTrace();
Log.d("log2=", error.toString());
requestQueue.stop();
}
});
// Add the request to the RequestQueue.
requestQueue.add(stringRequest);