-1
[{
    "name":"pawan",
    "image":"HTTP://example.com/Pavan/errorlog.png",
    "age ":"24",
    "address":"Pawan",
    "town":"PAWAN"
}]

I am passing all values, in first Activity I am displaying 3 fields, in second activity I want to display all fields using Intents.

Piotr Olaszewski
  • 6,017
  • 5
  • 38
  • 65

1 Answers1

0

While your data have a JSONArray format, you can pass it as a String:

In your first activity:

intent.putString("personsList", yourJsonArray.toString);

And then, to retrieve it in your second activity:

JSONArray jsonArray = new JSONArray(getIntent().getStringExtra("personsList"));
Rami
  • 7,879
  • 12
  • 36
  • 66