Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to parse php json url into android list view here is to code i am getting no display
    primarykey
    data
    text
    <p>I am parsing json from the following url </p> <p><a href="http://www.kaverisoft.com/careers/assignments/android/a1.php" rel="nofollow">http://www.kaverisoft.com/careers/assignments/android/a1.php</a></p> <p>with the following code </p> <p>public class MainActivity extends ListActivity {</p> <pre><code>/** Called when the activity is first created. */ @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setListAdapter(new ArrayAdapter( this,android.R.layout.simple_list_item_1, this.populate())); } private ArrayList&lt;String&gt; populate() { ArrayList&lt;String&gt; items = new ArrayList&lt;String&gt;(); try { URL url = new URL ("http://www.kaverisoft.com/careers/assignments/android/a1.php"); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("GET"); urlConnection.connect(); // gets the server json data BufferedReader bufferedReader = new BufferedReader(new InputStreamReader( urlConnection.getInputStream())); String next; while ((next = bufferedReader.readLine()) != null){ JSONArray ja = new JSONArray(next); for (int i = 0; i &lt; ja.length(); i++) { JSONObject jo = (JSONObject) ja.get(i); items.add(jo.getString("text")); } } } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return items; } </code></pre> <p>}</p> <p>The logcat shows that org.json.JSONException value text not found </p> <p>but i am not able to populate any data to listview,but if i use direct json format url i can get data populated please help.</p> <p>the output is like the image below.</p> <p>Please help me solve this . </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload