Hello guys I\'m trying to decode a JSON value into my Android Application, But I\'m not really sure What Am I doing wrong in my code...
This is my PHP file:
I will try to answer :-
As per your code you have this String ["1","Admin","123","Adm","messages","0"] which is clearly a jsonarray but you are parsing as jsonobject in android.
as @Boban said you must not run network operations on main thread so avoid dat.
Now taking the response as what i mentioned in 1 here is how you will do :-
JSONArray jArray=new JSONArray(json_str)
String id=jArray.getString(0);
String admin=jArray.getString(1);
.
.
.
Hope it helps ... and if i m wrong please correct me :)
thx