views:

99

answers:

1

Is there a method of the Activity lifecycle which is called if the user presses the back button, but not if the the method startActivityForResult() is called? I couldn't find a method by testing it.

+1  A: 

I'm sorry, I just didn't saw the solution, but here it is:

By calling startActivityForResult(), the methods onPause() and onStop() of the original activity are called.

When pressing the Back Button, the methods onPause(), onStop() and onDestroy() are called.

So the difference is the onDestroy() method.

Roflcoptr