The question is not about how to use startActivityForResult but about the life cycle relating to the finish () event.
I am developing an app in java, android studio.
I have two activitys, A and B, being A my MainActivity.
When I'm in activity B and I press the back button on android (onBackPressed) ...
finish();
I need to do some things in activity A.
The onCreate method is not executed since the activity was already created ... which method can I use?