使用StringRequest传递参数以在Volley库中获取JSON数组?

I wanted to fire custom query in sql by passing a parameter to server and get JSON array. I'm using Volley library to handle html requests. But, with the following code my application freezes. I've searched though internet but I'm not able to recover it. Here's the code:

StringRequest postRequest = new StringRequest(Request.Method.POST, Config.serv_url, /*url to server*/ new Response.Listener<String>()
    {
        @Override
        public void onResponse(String response) {
            try {
                JSONArray jsonArray = new JSONArray(response);

                int count = 0;
                while(count<response.length()) {
                    try {
                        JSONObject jsonObject = jsonArray.getJSONObject(count);
                                arrayList.add(new Album(jsonObject.getString("id")));
                        count++;
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
            adapter = new customImagesSwipe(arrayList,DisplayActivity.this);
            viewPager.setAdapter(adapter);
        }
    }, new Response.ErrorListener(){
        @Override
        public void onErrorResponse(VolleyError error) {
            Toast.makeText(DisplayActivity.this, "Error :- " + error, Toast.LENGTH_LONG).show();
        }
    }) {
        // here is params will add to your url using post method
        @Override
        protected Map<String, String> getParams() {
            Map<String, String> params = new HashMap<String, String>();
            params.put("num", image); //value for param
            //params.put("2ndParamName","valueoF2ndParam");
            return params;
        }
    };
    MySingleton.getMinstance(DisplayActivity.this).addToRequestQueue(postRequest);

Here's the php script:

<?php
$host = "localhost";
$user_name = "root";
$password = "";
$db_name = "imagesfromserver";
$con = mysqli_connect($host,$user_name,$password,$db_name);

$num = $_POST["num"];
$sql = "select * from album_info where (lower(id) LIKE 'num%');";
$result = mysqli_query($con,$sql);
$response = array();

while($row = mysqli_fetch_array($result))
{
    array_push($response,array("id"=>$row["id"],"title"=>$row["title"]));
}

echo json_encode($response);

mysqli_close($con);

?>

I have no prior knowledge of working in client server. I'm implementing from searching from Internet.

Update:

JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.POST, Config.serv_url, new Response.Listener<JSONArray>() {
        @Override
        public void onResponse(JSONArray response) {

            int count = 0;
            while(count<response.length()){
                try {
                    JSONObject jsonObject = response.getJSONObject(count);
                    arrayList.add(new Album(jsonObject.getString("id"), jsonObject.getString("title")));
                    count++;
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }

            adapter = new customImagesSwipe(arrayList,DisplayActivity.this);
            viewPager.setAdapter(adapter);
        }
    }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
            Toast.makeText(DisplayActivity.this,"NULL
" + error,Toast.LENGTH_LONG ).show();
        }
    });
    MySingleton.getMinstance(DisplayActivity.this).addToRequestQueue(jsonArrayRequest);