The link is http://iipacademy.in/askpoll/ten_feed.php
exception is in onPostExecute() method (4th line) :
Log.i("result", result); try { if (result != null) { JSONArray jsonArray = new JSONArray(result); // erreor for (int i = 0; i
LOGCAT:
12-18 03:20:45.447: W/System.err(2790): org.json.JSONException: Value response of type java.lang.String cannot be converted to JSONArray 12-18 03:20:45.447: W/System.err(2790): at org.json.JSON.typeMismatch(JSON.java:111) 12-18 03:20:45.447: W/System.err(2790): at org.json.JSONArray.(JSONArray.java:91) 12-18 03:20:45.447: W/System.err(2790): at org.json.JSONArray.(JSONArray.java:103) 12-18 03:20:45.447: W/System.err(2790): at com.example.askpollie.LatestPollParticipated$FetchingEventsDetails.onPostExecute(LatestPollParticipated.java:188) 12-18 03:20:45.447: W/System.err(2790): at com.example.askpollie.LatestPollParticipated$FetchingEventsDetails.onPostExecute(LatestPollParticipated.java:1) 12-18 03:20:45.447: W/System.err(2790): at android.os.AsyncTask.finish(AsyncTask.java:631) 12-18 03:20:45.447: W/System.err(2790): at android.os.AsyncTask.access$600(AsyncTask.java:177) 12-18 03:20:45.447: W/System.err(2790): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644) 12-18 03:20:45.447: W/System.err(2790): at android.os.Handler.dispatchMessage(Handler.java:99) 12-18 03:20:45.447: W/System.err(2790): at android.os.Looper.loop(Looper.java:137) 12-18 03:20:45.447: W/System.err(2790): at android.app.ActivityThread.main(ActivityThread.java:5103) 12-18 03:20:45.447: W/System.err(2790): at java.lang.reflect.Method.invokeNative(Native Method) 12-18 03:20:45.447: W/System.err(2790): at java.lang.reflect.Method.invoke(Method.java:525) 12-18 03:20:45.447: W/System.err(2790): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 12-18 03:20:45.447: W/System.err(2790): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 12-18 03:20:45.447: W/System.err(2790): at dalvik.system.NativeStart.main(Native Method) 12-18 03:20:45.447: D/dalvikvm(2790): GC_FOR_ALLOC freed 5131K, 55% free 4437K/9672K, paused 2ms, total 2ms
Message is an array so what should be its code or how to can it be solved ?
Thanks in advance . . .