stack user stack user - 25 days ago 5
JSON Question

How can i import json object using android volley?

I'm following this tutorial to import json data from online server.
fortunately that's work when i request as

,
but unfortunately not working when request as
JsonObjectRequest

fail in volley exception :


08-27 18:14:24.586 32344-32344/com.mohamedslama.trydb E/TAG:
com.android.volley.ParseError: org.json.JSONException: Value connected
of type java.lang.String cannot be converted to JSONObject


and here is the
php file
.

so any suggestion please,
Thanks in advance.

Answer Source

Remove echo "connected" from line 8 in your php code. It destroy the json structure