Search code examples
androidandroid-activity

Finish() ing duplicate activities


If you have several activities onPause() is there a way to finish a specific activity?

edit: so for example, imagine on start activity 1 is called. Then activity 1 uses an intent to go to activity 2. then an update is made to the database and calls activity 1_new again so that it displays the updated database. At that point i want to get rid of the old activity 1.


Solution

  • What I ended up doing here was calling startActivityForResult in the first activity. That way I was able to redisplay updated information from the second activity.