org.json.JSONException: End of input at character
Change
JSONObject jsonObject = new JSONObject(result);
to
result=getJSONUrl(url); //<< get json string from server
JSONObject jsonObject = new JSONObject(result);
inside doInBackground
method of DownloadJSONFileAsync
because currently you are not making any post for getting Json data from the server and just trying to parse an empty string to json
as you can see from this answer, you are probably getting a blank response.
in general, the org.json.JSONException: End of input at character N of...
means that the JSON couldn't be parsed and something is not being done right.
if the problem is that you're getting a blank response, you should make sure you get a response from the server before trying to parse it (like ρяσѕρєя K's answer).
if the problem is a bad JSON, you should try and validate it. JSONLint is a very good place to start.