org.json.JSONException: End of input at character 0 of W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:449) code example
Example: org.json.jsonexception: end of input at character 0 of
Change
JSONObject jsonObject = new JSONObject(result);
to
result=getJSONUrl(url); //<< get json string from server
JSONObject jsonObject = new JSONObject(result);