I start an activity from the main one using a Intent:
Intent i = new Intent(getApplicationContext(), InfoChiamata.class); i.putExtra("codice_cliente", codice_cliente[tv_clicked_id]); i.putExtra("descrizione_chiamata", descrizione_chiamata[tv_clicked_id]); startActivity(i); How can I edit the main activity ui from the activity started whit Intent? How can I know when i return back from the second activity to the main one? I tried to Override the onResume and onStart method but the application doesn't even start. I tryed to override onRestart method when it get called the application crash.
@Override protected void onRestart() { if(call_back == 1) Toast.makeText(getApplicationContext(), "asd", Toast.LENGTH_LONG).show(); } call_back variable is set to 1 from the secondary activity, when it is launched.
Thanks, Mattia