I'm following this tutorial to import json data from online server. fortunately that's work when i request as StringRequest
, 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.
Remove echo "connected"
from line 8 in your php code. It destroy the json structure
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.