tags:

views:

192

answers:

2

Could someone provide a description of what happens when an activity calls its finish() ?

Does it exits immediately or completes the function from which it was called ?

A: 

ondestroy() is the final call you receive before your activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the isFinishing() method.

+3  A: 

Does it exits immediately or completes the function from which it was called ?

The method that called finish() will run to completion. The finish() operation will not even begin until you return control to Android.

CommonsWare