I am new to android and struggling to get the values of the json object. Can someone help me out?
the json returned from the server is {"status":"active"}
I'm using Android Asynchronous Http Client library..
public void onSuccess(int statusCode, Header[] headers, JSONObject response) { try { JSONArray j = new JSONArray(response); t.setText(j.getJSONObject(0).getString('status'));//this doesn't set the text to the status } catch (JSONException e) { Log.e("MYAPP", "unexpected JSON exception", e); } }