Я посылаю запрос на сервер и получение ответа и отправку ответа на следующую деятельность, в ответ я так много полей, это выглядит так
http://gujjumatch.com/webservice/searchresult?version=apps&user_login_id=2650
, но когда я посылаю к следующей активности, только один jsonobject отправляет вместо целых объектов, может ли кто-нибудь помочь мне с этим?передать более одного JSONObject к следующему действию
public class SearchResults extends ListActivity{
private ProgressDialog pDialog;
private String Id;
private String results;
private ArrayList<HashMap<String,String>> aList;
private static String MATCH_URL = null;
private static final String TAG_MATCH="searchresult";
private static final String TAG_MATCH_ID="match_detail_id";
private static final String TAG_NAME="name";
private static final String TAG_PROFILE="profile_id";
private static final String TAG_IMAGE="image";
private static final String TAG_CAST="cast";
private static final String TAG_AGE="age";
private static final String TAG_LOCATION="location";
JSONArray searchresult=null;
private CustomAdapterSearch adapter;
private TextView nomathc;
private String Nam;
private String Pro;
private String Photo;
private String Jati;
private String Umar;
private String Jagya;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.list_view_searchresult);
Id=this.getIntent().getStringExtra("id");
System.out.println("searching id"+Id);
results=this.getIntent().getStringExtra("prmatch_id");
System.out.println("Results"+results);
Nam=this.getIntent().getStringExtra("prname");
System.out.println("Naam"+Nam);
Pro=this.getIntent().getStringExtra("prprofile");
System.out.println("Profilesss"+Pro);
Photo=this.getIntent().getStringExtra("primage");
System.out.println("Naam"+Photo);
Jati=this.getIntent().getStringExtra("prcast");
System.out.println("Naam"+Jati);
Umar=this.getIntent().getStringExtra("prage");
System.out.println("Naam"+Umar);
Jagya=this.getIntent().getStringExtra("prlocation");
System.out.println("Naam"+Jagya);
aList = new ArrayList<HashMap<String,String>>();
HashMap<String,String> idMap = new HashMap<String,String>();
idMap.put(TAG_MATCH_ID, Id);
idMap.put(TAG_NAME, Nam);
idMap.put(TAG_PROFILE, Pro);
idMap.put(TAG_IMAGE, Photo);
idMap.put(TAG_CAST, Jati);
idMap.put(TAG_AGE, Umar+" years");
idMap.put(TAG_LOCATION, Jagya);
aList.add(idMap);
//....
adapter = new CustomAdapterSearch(SearchResults.this, aList); // we create your adapter
setListAdapter(adapter); // we set the list adapter
nomathc=(TextView)findViewById(R.id.no_match);
}
пытаются использовать SharedPreference .. Проверить: http://stackoverflow.com/questions/23024831/android-shared-preferences-example –
вы можете увидеть мой код здесь http://stackoverflow.com/questions/ 27444526/arraylisthashmapstring-string-not-set-to-listview/27456030 # 27456030 –