I have a problem with my app android. I new in this, and i'm learning. I have 2 activities, first call the second activity and in this activity i add string, and i want see this new string in the first activity, I try with this code
protected void onStart() {
Bundle bundle = getIntent().getExtras();
paises.add(bundle.getString("Pais"));
Log.i("pais", bundle.getString("Pais"));
habitantes.add(bundle.getString("Habitantes"));
super.onStart();
}
I try with OnCreate, OnResume and my app close, anyone can help me?
In the second activity I put this code
Intent i = new Intent(this, MainActivity.class);
i.putExtra("Pais", pa);
i.putExtra("Habitantes", ha);
EDIT: Is a simple app, in the first activity i have a arrayList, and i want in another activity add to this arrayLista a string, but when i turn to the first activity the arraylist don't update :S