json error end of input at character 0 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);