Я хочу передать список объектов из одного действия из другого действия. У меня есть один класс SharedBooking. Ниже:
public class SharedBooking {
public int account_id;
public Double betrag;
public Double betrag_effected;
public int taxType;
public int tax;
public String postingText;
}
Код из вызывающей активности:
public List<SharedBooking> SharedBookingList = new ArrayList<SharedBooking>();
public void goDivision(Context context, Double betrag, List<SharedBooking> bookingList) {
final Intent intent = new Intent(context, Division.class);
intent.putExtra(Constants.BETRAG, betrag);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(intent);
}
COde для вызываемой активности:
Bundle extras = getIntent().getExtras();
if (extras != null) {
amount = extras.getDouble(Constants.BETRAG,0);
}
Как я могу отправить список SharedBooking из одного действия и получить его в другой деятельности?
Пожалуйста, предложите мне любую полезную ссылку или образец кода.