Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Programming 5

Android Programming 5

introductionon how android deal with JSON

Giovanni De Francesco

February 02, 2013
Tweet

More Decks by Giovanni De Francesco

Other Decks in Programming

Transcript

  1. JSONObject ›  JSONObject json = new JSONObject(); ›  json.put(“name”,”value”); › 

    JSONObject json2 = new JSONObject(jsonstring); ›  json.getString(“name”); //or getBoolean etc… Android Programming
  2. HttpPost HttpPost post = new HttpPost(”url"); ArrayList<NameValuePair>parameters = new ArrayList<NameValuePair>(2);

    parameters.add(new BasicNameValuePair(”name”,”value”); post.setEntity(new UrlEncodedFormEntity(parameters)); Android Programming