I was confused how to separate the My Jason piece of code: Logcat: I want to create my data like this: one Change the line like this: JsonArray data I separated the received chat messages I do not want to be able to create a big bubble in each bubble one by one
What should I do to isolate the data from each other? Can someone help me? Thank you in advance.
if (! Content.equals ("null")) {try {JSONArray jArr = new JSONArray (content); String message = ""; For (int i = 0; i & lt; jArr.length (); i ++) {JSONObject jObj = jArr.getJSONObject (i); String Message = jObj.getString ("message"); Message + = Message + "\ n"; } ShowMessage (message, incorrect); } Grip (JasonAxpection E) {// Two-Auto Auto-Generated Cat Block E.Pintstaxtres (); }} And (toast.maketext.a, "error", toast.LnnHH_LOG) Show ();}
06 -22 09: 15: 20.486: D / ADBUG (51 9): Content: [{"First name": "teach", "message": "test"}, {"firstname": "teach", "message": {"Firstname": "teach", "message": "test"}, {"firstname", "message": "message": "test", {"first name": "teach" {"First name": "teach", "message": "teach", " First name ":" Teach "," Message ":" DDFFS "},
for string message = ""; (int i = 0; i & lt; jArr.length (); i ++) {JSONObject jObj = jArr. GetJSONObject (i); String Message = jObj.getString ("message"); ShowMessage (Message, False); // Take it here but not outside for 'for')
No comments:
Post a Comment