Q:

Update activity to click back on Android

I have two activity in my app: main and search. 
In the main the user types origin and destination by clicking search will search for activity that shows the map.  But if I click the back of Android it back to main in the same state I needed the onCreate was called again. 
Research the onResume() method but do not know how to fit it in my app. 
Should I put the onCreate() within onResume()? 
    public void onCreate(Bundle savedInstanceState) {
    db = new DB(getBaseContext());
    db.getWritableDatabase();
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    final ActionBar actionBar = getActionBar();
    actionBar.setSubtitle("http://www.eptc.com.br");

    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setDisplayShowHomeEnabled(true);

    intent = new Intent(Intent. ACTION_MAIN);

    date=(TextView)findViewById(R.id.date);

    date.setText(today);

    time=(TextView)findViewById(R.id.time);

    time.setText(horaHoje);

    imageViewDatepicker=(ImageView)findViewById(R.id.imageViewDatepicker);
    imageViewDatepicker.setOnClickListener(this);

    imageViewTimepicker=(ImageView)findViewById(R.id.imageViewTimepicker);
    imageViewTimepicker.setOnClickListener(this);

    /*
     * Prepara para receber os eventos dos botões
     */
    Button btnSearch = (Button) findViewById(R.id.btnSearch);

    /*
     * Prepara para receber os valores dos texts
     */
    final EditText txtOrigem = (EditText) findViewById(R.id.txtOrigem);
    final EditText txtDestino = (EditText) findViewById(R.id.txtDestino);

    /*
     * Suporte ao onclick do botão pesquisar
     */

    OnClickListener btnSearchOnClickListener = new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub

        }
    };

    btnSearch.setOnClickListener(new View. OnClickListener() {

        @Override
        public void onClick(View v) {                                                   
            BandeiraDAO dao = new BandeiraDAO(getBaseContext());

            getDayOfWeek();
            checkDateHour();

            Intent intent = new Intent(Main.this, Search.class);
            intent.putExtra("diaMes", diaMes);
            intent.putExtra("data",  selecteddate);
            intent.putExtra("hora", selectedHour );
            intent.putExtra("diaDaSemana", diaDaSemana);
            intent.putExtra("origin",txtOrigem.getText().toString());
            intent.putExtra("destination", txtDestino.getText().toString());
            startActivity(intent);

        }
    });                
}

A:

But if I click the back of Android it back to main in the same state I needed the onCreate was called again

So, You can use recreate(), let me explain how. 
1.  Use startActivityForResult instead startActivity. 
Launch an activity for which you would like a result when it finished.  When this activity exits (by pressing Back or call finish()), your onActivityResult() method will be called with the given requestCode. 
Intent intent = new Intent(Main.this, Search.class);
            intent.putExtra("diaMes", diaMes);
            intent.putExtra("data",  selecteddate);
            intent.putExtra("hora", selectedHour );
            intent.putExtra("diaDaSemana", diaDaSemana);
            intent.putExtra("origin",txtOrigem.getText().toString());
            intent.putExtra("destination", txtDestino.getText().toString());
startActivityForResult(intent, 1234);  // 1234 will be requestCode on callback

2.  Override onActivityResult in FirstActivity And recreate it. 
You will receive this call immediately before onResume() when your activity is re-starting. 
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == 1234) { // this code was used on startActiviyForResults
        if (android.os. Build. VERSION.SDK_INT >= 11)
        {
            recreate(); // since API11
        }
        else
        {
            // workaround for pre-API11
            startActivity(getIntent());
            finish();
        }
    }
}

This code, recreates the activity, the current instance will go through its lifecycle to onDestroy() and a new instance then created after it.