我按下按钮点击Asyntask活动,如下所示
class GetBedroomProperty extends AsyncTask<String, String, String> {
@Override
protected void onPreExecute() {
}
protected String doInBackground(String... params) {
try {
List<NameValuePair> params1 = new ArrayList<NameValuePair>();
params1.add(new BasicNameValuePair("Search_Bhk", searchBhk));
params1.add(new BasicNameValuePair("Tab", tab_select));
JSONObject json = jsonParser.makeHttpRequest(
url_property_bedroom, "GET", params1);
Log.d("Single user Details", json.toString());
success = json.getInt(TAG_SUCCESS);
if (success == 1) {
propertyDetails = json.getJSONArray(TAG_address);
String[] title = new String[propertyDetails.length()];
String[] phoneArray = new String[propertyDetails.length()];
String[] email = new String[propertyDetails.length()];
String[] imageArray = new String[propertyDetails.length()];
int length = propertyDetails.length();
for (int i = 0; i < propertyDetails.length(); i++) {
JSONObject c = propertyDetails.getJSONObject(i);
String Id = c.getString(TAG_Id);
String Email = c.getString(TAG_Email);
String propertyType = c.getString(TAG_Property_Type);
String sellType = c.getString(TAG_Sell_Type);
String coveredArea = c.getString(TAG_Covered_Area);
String bedroom = c.getString(TAG_Bedroom);
String totalPrice = c.getString(TAG_Total_Price);
String Address = c.getString(TAG_ADD);
String mobNo = c.getString(TAG_Phone);
String setImage = c.getString(TAG_Image);
title[i] = coveredArea + " " + totalPrice
+ System.getProperty("line.separator") + ""
+ propertyType + " " + bedroom
+ System.getProperty("line.separator") + " "
+ Address;
phoneArray[i] = mobNo;
email[i] = Email;
imageArray[i] = setImage;
}
Bundle bundel = new Bundle();
bundel.putStringArray("title", title);
bundel.putStringArray("phoneArray", phoneArray);
bundel.putStringArray("emailArray", email);
bundel.putStringArray("ImageArray", imageArray);
CallListActivity(bundel, length);
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
protected void onPostExecute(String file_url) {
// pDialog.dismiss();
if (success == 1) {
} else {
Toast.makeText(getActivity(), "No Match Foun",
Toast.LENGTH_LONG).show();
}
}// end class
}
我从php页面获得结果,我通过bundle发送到下一个活动。我正在添加数组到bundle,然后我将它发送到其他活动。但我收到错误未通过的BINDER TRANSACTION,那我该怎么办?有没有办法将大件或更多数据发送到另一个活动?